Skip to content

Commit 07ad1c1

Browse files
committed
chore: Modify kkt config. #23
1 parent dc904d4 commit 07ad1c1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.kktrc.ts

+18
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ export default (conf: Configuration, env: string, options: LoaderConfOptions) =>
2020
VERSION: JSON.stringify(pkg.version),
2121
}));
2222

23+
conf.optimization = {
24+
...conf.optimization,
25+
splitChunks: {
26+
cacheGroups: {
27+
reactvendor: {
28+
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
29+
name: 'react-vendor',
30+
chunks: 'all',
31+
},
32+
prismjs: {
33+
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
34+
name: 'prismjs-vendor',
35+
chunks: 'async',
36+
},
37+
}
38+
}
39+
}
40+
2341
return conf;
2442
}
2543

0 commit comments

Comments
 (0)