We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a81dc0f commit 40b93b9Copy full SHA for 40b93b9
src/pluginWebpack4.ts
@@ -171,6 +171,15 @@ class VueLoaderPlugin {
171
watcher.close()
172
}
173
})
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
+ })
183
184
185
0 commit comments