Skip to content

Commit

Permalink
chore(deps): update dependency kkt to v7.
Browse files Browse the repository at this point in the history
Upgrade react-scripts to v5, Support Webpack 5.x
kktjs/kkt#198
  • Loading branch information
jaywcjlove committed Jan 10, 2022
1 parent 0dc593a commit 8ab202a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
22 changes: 22 additions & 0 deletions .kktrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ export default (conf: Configuration, env: 'development' | 'production', options:
);
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',
},
prismjs: {
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
name: 'prismjs-vendor',
chunks: 'all',
},
uiwjs: {
test: /[\\/]node_modules[\\/](@uiw)[\\/]/,
name: 'uiw-vendor',
chunks: 'all',
},
},
},
};
}
return conf;
};
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"prepare": "husky install",
"start": "kkt start",
"build": "kkt build",
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\""
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
"map": "source-map-explorer build/static/js/*.js --html build/website-result.html"
},
"repository": {
"type": "git",
Expand All @@ -18,23 +19,24 @@
"dependencies": {
"@uiw/copy-to-clipboard": "1.0.12",
"@uiw/react-github-corners": "1.5.3",
"@uiw/react-color-circle": "1.0.5",
"@uiw/react-color-shade-slider": "1.0.5",
"@uiw/react-color-sketch": "1.0.5",
"@uiw/react-color-wheel": "1.0.5",
"@uiw/react-color-circle": "1.0.8",
"@uiw/react-color-shade-slider": "1.0.8",
"@uiw/react-color-sketch": "1.0.8",
"@uiw/react-color-wheel": "1.0.8",
"react": "17.0.2",
"react-dom": "17.0.2",
"prismjs": "1.25.0"
"prismjs": "1.26.0"
},
"devDependencies": {
"@kkt/less-modules": "6.11.0",
"@kkt/less-modules": "7.0.5",
"@types/prismjs": "1.16.6",
"@types/react": "17.0.30",
"@types/react-dom": "17.0.9",
"@types/react": "17.0.38",
"@types/react-dom": "17.0.11",
"husky": "7.0.2",
"lint-staged": "11.1.2",
"kkt": "6.11.0",
"prettier": "2.3.2"
"source-map-explorer": "2.5.2",
"kkt": "7.0.5",
"prettier": "2.5.1"
},
"lint-staged": {
"*.{js,jsx,tsx,ts,less,md,json}": [
Expand Down

0 comments on commit 8ab202a

Please sign in to comment.