From c0e4820b825bece61f53476c4bd613da7dcfb59c Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 17 Jan 2022 19:33:13 +0800 Subject: [PATCH] website: update kkt config. --- website/.kktrc.ts | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/website/.kktrc.ts b/website/.kktrc.ts index b0f4840a..0293b691 100644 --- a/website/.kktrc.ts +++ b/website/.kktrc.ts @@ -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, @@ -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', + }, }, }, };