Skip to content

Commit 2bc3d57

Browse files
committed
chore: using await bundle.watchFiles
1 parent 19f7b70 commit 2bc3d57

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
@@ -915,7 +915,7 @@ async function buildEnvironment(
915915

916916
if (server) {
917917
// watching the files
918-
for (const file of bundle!.watchFiles) {
918+
for (const file of await bundle!.watchFiles) {
919919
if (path.isAbsolute(file) && fs.existsSync(file)) {
920920
server.watcher.add(file)
921921
}
@@ -998,7 +998,7 @@ async function buildEnvironment(
998998

999999
server.watcher.on('change', async (file) => {
10001000
// The playground/hmr test `plugin hmr remove custom events` need to skip the change of unused files.
1001-
if (!bundle!.watchFiles.includes(file)) {
1001+
if (!(await bundle!.watchFiles).includes(file)) {
10021002
return
10031003
}
10041004

0 commit comments

Comments
 (0)