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