Skip to content

Commit

Permalink
chore: update kkt config. #5
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 12, 2021
1 parent 5c5c6ea commit 2dcd8b1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .kktrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ export default (conf, env, options) => {
conf.plugins.push(new webpack.DefinePlugin({
VERSION: JSON.stringify(pkg.version),
}));

conf.optimization = {
...conf.optimization,
splitChunks: {
cacheGroups: {
reactvendor: {
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
name: 'react-vendor',
chunks: 'all',
},
prismjs: {
test: /[\\/]node_modules[\\/](codemirror)[\\/]/,
name: 'codemirror-vendor',
chunks: 'async',
},
},
},
};

conf.output = { ...conf.output, publicPath: './' }
return conf;
}

0 comments on commit 2dcd8b1

Please sign in to comment.