exclude workers file.

Signed-off-by: lihong <lihong67@huawei.com>
Change-Id: I99f2fe4d1c7f7a75b0831286659e7d6f67d9e561
This commit is contained in:
lihong
2022-01-07 16:36:48 +08:00
parent da0a807390
commit 15216e4f78
+3 -3
View File
@@ -48,20 +48,20 @@ function initConfig(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: {
name: 'commons',
priority: -20,
minChunks: 2,
chunks: 'initial',
reuseExistingChunk: true
}
}