Skip to content

Commit c0e4820

Browse files
committed
website: update kkt config.
1 parent 0f224c5 commit c0e4820

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

website/.kktrc.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export default (conf: Configuration, env: 'development' | 'production', options:
2121

2222
if (env === 'production') {
2323
/** https://github.com/uiwjs/react-code-preview/issues/94 */
24-
conf.module!.exprContextCritical = true;
25-
// conf.module!.exprContextRecursive = false;
24+
conf.module!.exprContextCritical = false;
2625
conf.output = { ...conf.output, publicPath: './' };
2726
conf.optimization = {
2827
...conf.optimization,
@@ -38,6 +37,28 @@ export default (conf: Configuration, env: 'development' | 'production', options:
3837
name: 'refractor-prismjs-vendor',
3938
chunks: 'all',
4039
},
40+
codemirror: {
41+
name: 'codemirror-vendors',
42+
chunks: 'all',
43+
test: /[\\/]node_modules[\\/](@codemirror)[\\/]/,
44+
priority: -2,
45+
},
46+
babel_standalone: {
47+
name: 'standalone-vendors',
48+
chunks: 'all',
49+
test: /[\\/]node_modules[\\/](@babel\/standalone)[\\/]/,
50+
priority: -2,
51+
},
52+
babel_vendors: {
53+
name: 'babel_vendors',
54+
chunks: 'all',
55+
test: /[\\/]node_modules[\\/](@babel)[\\/]/,
56+
},
57+
prismjs: {
58+
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
59+
name: 'prismjs-vendor',
60+
chunks: 'all',
61+
},
4162
},
4263
},
4364
};

0 commit comments

Comments
 (0)