Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40b93b9

Browse files
committed
fix: properly close the watcher after tests
1 parenta81dc0f commit40b93b9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/pluginWebpack4.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@ class VueLoaderPlugin {
171171
watcher.close()
172172
}
173173
})
174+
175+
// In some cases, e.g. in this project's tests,
176+
// even though needsHMR() returns true, webpack is not watching, thus no watchClose hook is called.
177+
// So we need to close the watcher when webpack is done.
178+
compiler.hooks.done.tap(id,()=>{
179+
if(watcher){
180+
watcher.close()
181+
}
182+
})
174183
}
175184
}
176185
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp