|
|
@ -67,6 +67,11 @@ function loader() { |
|
|
|
entryOnly: true, |
|
|
|
entryOnly: true, |
|
|
|
}).apply(childCompiler); |
|
|
|
}).apply(childCompiler); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 去除源码中的less css引用
|
|
|
|
|
|
|
|
new webpack.IgnorePlugin({ |
|
|
|
|
|
|
|
resourceRegExp: /\.(css|less)$/, |
|
|
|
|
|
|
|
}).apply(childCompiler); |
|
|
|
|
|
|
|
|
|
|
|
const subCache = `subcache ${__dirname} ${workerEntry}`; |
|
|
|
const subCache = `subcache ${__dirname} ${workerEntry}`; |
|
|
|
childCompiler.hooks.compilation.tap(WorkerLoaderName, compilation => { |
|
|
|
childCompiler.hooks.compilation.tap(WorkerLoaderName, compilation => { |
|
|
|
if (compilation.cache) { |
|
|
|
if (compilation.cache) { |
|
|
|