Skip to content

Commit

Permalink
website: update kkt config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 17, 2022
1 parent 0f224c5 commit c0e4820
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions website/.kktrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export default (conf: Configuration, env: 'development' | 'production', options:

if (env === 'production') {
/** https://github.com/uiwjs/react-code-preview/issues/94 */
conf.module!.exprContextCritical = true;
// conf.module!.exprContextRecursive = false;
conf.module!.exprContextCritical = false;
conf.output = { ...conf.output, publicPath: './' };
conf.optimization = {
...conf.optimization,
Expand All @@ -38,6 +37,28 @@ export default (conf: Configuration, env: 'development' | 'production', options:
name: 'refractor-prismjs-vendor',
chunks: 'all',
},
codemirror: {
name: 'codemirror-vendors',
chunks: 'all',
test: /[\\/]node_modules[\\/](@codemirror)[\\/]/,
priority: -2,
},
babel_standalone: {
name: 'standalone-vendors',
chunks: 'all',
test: /[\\/]node_modules[\\/](@babel\/standalone)[\\/]/,
priority: -2,
},
babel_vendors: {
name: 'babel_vendors',
chunks: 'all',
test: /[\\/]node_modules[\\/](@babel)[\\/]/,
},
prismjs: {
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
name: 'prismjs-vendor',
chunks: 'all',
},
},
},
};
Expand Down

1 comment on commit c0e4820

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.