Skip to content

Commit f1a3953

Browse files
committed
chore: using await bundle.watchFiles
1 parent f89941d commit f1a3953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vite/src/node/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ async function buildEnvironment(
930930

931931
if (server) {
932932
// watching the files
933-
for (const file of bundle!.watchFiles) {
933+
for (const file of await bundle!.watchFiles) {
934934
if (path.isAbsolute(file) && fs.existsSync(file)) {
935935
server.watcher.add(file)
936936
}
@@ -1013,7 +1013,7 @@ async function buildEnvironment(
10131013

10141014
server.watcher.on('change', async (file) => {
10151015
// The playground/hmr test `plugin hmr remove custom events` need to skip the change of unused files.
1016-
if (!bundle!.watchFiles.includes(file)) {
1016+
if (!(await bundle!.watchFiles).includes(file)) {
10171017
return
10181018
}
10191019

0 commit comments

Comments
 (0)