diff --git a/.kktrc.ts b/.kktrc.ts index e009cbbf..f98a87b8 100644 --- a/.kktrc.ts +++ b/.kktrc.ts @@ -16,13 +16,39 @@ export default (conf: Configuration, env: 'production' | 'development', options: path.resolve(process.cwd(), 'src'), ] }); - // conf.resolve!.alias = { '@uiw/react-monacoeditor': process.cwd() }; // Get the project version. conf.plugins!.push(new webpack.DefinePlugin({ VERSION: JSON.stringify(pkg.version), })); if (env === 'production') { conf.output = { ...conf.output, publicPath: './' }; + conf.optimization = { + ...conf.optimization, + splitChunks: { + cacheGroups: { + reactvendor: { + test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/, + name: 'react-vendor', + chunks: 'all', + }, + refractor: { + test: /[\\/]node_modules[\\/](refractor)[\\/]/, + name: 'refractor-prismjs-vendor', + chunks: 'all', + }, + runtime: { + test: /[\\/]node_modules[\\/](@babel)[\\/]/, + name: 'babel-vendor', + chunks: 'all', + }, + parse5: { + test: /[\\/]node_modules[\\/](parse5)[\\/]/, + name: 'parse5-vendor', + chunks: 'all', + }, + } + } + } } return conf; } diff --git a/package.json b/package.json index 6517b3b5..9dcab30c 100644 --- a/package.json +++ b/package.json @@ -34,20 +34,20 @@ "@babel/runtime": ">=7.10.0" }, "devDependencies": { - "@kkt/less-modules": "6.11.0", - "@kkt/raw-modules": "6.11.0", - "@kkt/scope-plugin-options": "6.11.0", - "@types/react": "17.0.20", - "@types/react-dom": "17.0.9", + "@kkt/less-modules": "7.0.5", + "@kkt/raw-modules": "7.0.5", + "@kkt/scope-plugin-options": "7.0.5", + "@types/react": "17.0.38", + "@types/react-dom": "17.0.11", "@uiw/react-github-corners": "1.5.3", - "@uiw/react-markdown-preview": "3.3.2", + "@uiw/react-markdown-preview": "3.4.7", "react": "17.0.2", "react-dom": "17.0.2", - "kkt": "6.11.0", + "kkt": "7.0.5", "tsbb": "3.1.9" }, "dependencies": { - "@stackblitz/sdk": "1.5.2" + "@stackblitz/sdk": "1.5.3" }, "eslintConfig": { "extends": [ diff --git a/src/react-app-env.d.ts b/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5f..00000000 --- a/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -///