From 9229f853809c62825782f59d3d0aee4e71e66f1c Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 19 Aug 2022 15:32:36 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0loader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/webpack-fui-worker-plugin/worker-loader.js | 5 +++++ 1 file changed, 5 insertions(+) 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) {