From 08c96defaecf19bbb59883a15b783943b03fe89e Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Wed, 5 Jan 2022 10:22:09 +0800 Subject: [PATCH] chore(deps): update dependency kkt to v7. Upgrade react-scripts to v5, Support Webpack 5.x https://github.com/kktjs/kkt/issues/198 --- examples/website/.kktrc.js | 26 +++++++++++++++++++++++++- examples/website/package.json | 8 ++++---- package.json | 19 +++++++++---------- packages/antdp-edit-table/package.json | 2 +- packages/antdp-ui/package.json | 2 +- 5 files changed, 40 insertions(+), 17 deletions(-) diff --git a/examples/website/.kktrc.js b/examples/website/.kktrc.js index d9cdb143e..c0972d995 100644 --- a/examples/website/.kktrc.js +++ b/examples/website/.kktrc.js @@ -5,6 +5,30 @@ export default (conf, env, options) => { conf = lessModules(conf, env, options); conf = rawModules(conf, env, options); conf.module.exprContextCritical = false; - conf.output = { ...conf.output, publicPath: './' }; + 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-vendor', + chunks: 'all', + }, + antd: { + test: /[\\/]node_modules[\\/](antd)[\\/]/, + name: 'antd-vendor', + chunks: 'all', + }, + }, + }, + }; + } return conf; }; diff --git a/examples/website/package.json b/examples/website/package.json index d1d66d99e..1765aa781 100644 --- a/examples/website/package.json +++ b/examples/website/package.json @@ -39,10 +39,10 @@ "web-vitals": "1.0.1" }, "devDependencies": { - "@kkt/less-modules": "6.11.0", - "@kkt/raw-modules": "6.11.0", - "@kkt/scope-plugin-options": "6.11.0", - "kkt": "6.11.0" + "@kkt/less-modules": "7.0.4", + "@kkt/raw-modules": "7.0.4", + "@kkt/scope-plugin-options": "7.0.4", + "kkt": "7.0.4" }, "eslintConfig": { "extends": [ diff --git a/package.json b/package.json index a2efd8ef2..4d4ba4973 100644 --- a/package.json +++ b/package.json @@ -48,20 +48,20 @@ "author": "jaywcjlove", "license": "MIT", "dependencies": { - "@kkt/less-modules": "6.11.0", - "@kkt/react-library": "6.11.0", - "@types/jest": "27.0.3", - "@types/react": "17.0.37", + "@kkt/less-modules": "7.0.4", + "@kkt/react-library": "7.0.4", + "@types/jest": "27.4.0", + "@types/react": "17.0.38", "@types/react-dom": "17.0.11", "@types/react-test-renderer": "17.0.1", "@umijs/preset-react": "1.8.30", "babel-plugin-import": "1.13.3", - "compile-less-cli": "1.8.9", + "compile-less-cli": "1.8.11", "husky": "7.0.4", - "jest-environment-jsdom": "27.4.4", - "kkt": "6.11.0", + "jest-environment-jsdom": "27.4.6", + "kkt": "7.0.4", "lerna": "4.0.0", - "lint-staged": "12.1.4", + "lint-staged": "12.1.5", "prettier": "2.5.1", "react": "17.0.2", "react-dom": "17.0.2", @@ -70,6 +70,5 @@ "tsbb": "3.5.4", "umi": "3.5.20", "umi-plugin-antd-icon-config": "2.0.4" - }, - "version": "1.8.17" + } } diff --git a/packages/antdp-edit-table/package.json b/packages/antdp-edit-table/package.json index 4e4e79cd1..aa89dbde5 100644 --- a/packages/antdp-edit-table/package.json +++ b/packages/antdp-edit-table/package.json @@ -40,7 +40,7 @@ "rc-field-form": "~1.22.0" }, "devDependencies": { - "@types/react": "17.0.37", + "@types/react": "17.0.38", "@types/react-dom": "17.0.11", "antd": "4.17.4", "babel-plugin-import": "1.13.3", diff --git a/packages/antdp-ui/package.json b/packages/antdp-ui/package.json index 1587d0d02..14c319bda 100644 --- a/packages/antdp-ui/package.json +++ b/packages/antdp-ui/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "@types/classnames": "2.3.1", - "@types/react": "17.0.37", + "@types/react": "17.0.38", "@types/react-dom": "17.0.11", "antd": "4.17.4", "babel-plugin-import": "1.13.3",