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.
2 parents 5f75900 + fc2283d commit 9bd6e78Copy full SHA for 9bd6e78
lib/virtual.js
@@ -32,10 +32,16 @@ function VirtualModulesPlugin(compiler) {
32
};
33
}
34
35
- compiler.hooks.watchRun.tapAsync('VirtualModulesPlugin', (watcher, callback) => {
+ const watchRunHook = (watcher, callback) => {
36
this._watcher = watcher.compiler || watcher;
37
callback();
38
- });
+ };
39
+
40
+ if (compiler.hooks) {
41
+ compiler.hooks.watchRun.tapAsync('VirtualModulesPlugin', watchRunHook);
42
+ } else {
43
+ compiler.plugin('watch-run', watchRunHook);
44
+ }
45
46
47
VirtualModulesPlugin.prototype.writeModule = function(filePath, contents) {
0 commit comments