Skip to content

Commit

Permalink
chore: Modify kkt config. #23
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 14, 2021
1 parent dc904d4 commit 07ad1c1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .kktrc.ts
Expand Up @@ -20,6 +20,24 @@ export default (conf: Configuration, env: string, options: LoaderConfOptions) =>
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[\\/](prismjs)[\\/]/,
name: 'prismjs-vendor',
chunks: 'async',
},
}
}
}

return conf;
}

0 comments on commit 07ad1c1

Please sign in to comment.