Skip to content

Commit 2dcd8b1

Browse files
committed
chore: update kkt config. #5
1 parent 5c5c6ea commit 2dcd8b1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.kktrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,25 @@ export default (conf, env, options) => {
1818
conf.plugins.push(new webpack.DefinePlugin({
1919
VERSION: JSON.stringify(pkg.version),
2020
}));
21+
22+
conf.optimization = {
23+
...conf.optimization,
24+
splitChunks: {
25+
cacheGroups: {
26+
reactvendor: {
27+
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
28+
name: 'react-vendor',
29+
chunks: 'all',
30+
},
31+
prismjs: {
32+
test: /[\\/]node_modules[\\/](codemirror)[\\/]/,
33+
name: 'codemirror-vendor',
34+
chunks: 'async',
35+
},
36+
},
37+
},
38+
};
39+
2140
conf.output = { ...conf.output, publicPath: './' }
2241
return conf;
2342
}

0 commit comments

Comments
 (0)