Browse Source

chore: 更新loader

es6
iapyang 2 years ago
parent
commit
9229f85380
  1. 5
      plugins/webpack-fui-worker-plugin/worker-loader.js

5
plugins/webpack-fui-worker-plugin/worker-loader.js

@ -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) {

Loading…
Cancel
Save