exclude workers file.

Signed-off-by: lihong <lihong67@huawei.com>
Change-Id: Icc0011d8b5436d7f11760b1017542fc333ded67f
This commit is contained in:
lihong
2022-01-07 18:09:07 +08:00
parent e0ba2d57ff
commit 3573d22170
+3 -3
View File
@@ -139,21 +139,21 @@ let config = {
},
optimization: {
splitChunks: {
chunks: "all",
chunks(chunk) {
return !/^\.\/workers\//.test(chunk.name);
},
minSize: 0,
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]/,
priority: -10,
name: "vendors",
chunks: 'initial'
},
commons: {
test: /\.js|css|hml$/,
name: 'commons',
priority: -20,
minChunks: 2,
chunks: 'initial',
reuseExistingChunk: true
}
}