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 8, 2022
1 parent bf59d29 commit 078d1a2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 26 deletions.
60 changes: 37 additions & 23 deletions .kktrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,45 @@ export default (conf: Configuration, env: 'production' | 'development', options:
}),
);

conf.optimization = {
...conf.optimization,
splitChunks: {
cacheGroups: {
reactvendor: {
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
name: 'react-vendor',
chunks: 'all',
},
katex: {
test: /[\\/]node_modules[\\/](katex)[\\/]/,
name: 'katex-vendor',
chunks: 'all',
},
prismjs: {
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
name: 'prismjs-vendor',
chunks: 'async',
},
},
},
};

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',
},
katex: {
test: /[\\/]node_modules[\\/](katex)[\\/]/,
name: 'katex-vendor',
chunks: 'all',
},
prismjs: {
test: /[\\/]node_modules[\\/](refractor)[\\/]/,
name: 'refractor-vendor',
chunks: 'all',
},
codemirror: {
test: /[\\/]node_modules[\\/](@codemirror)[\\/]/,
name: 'codemirror-vendor',
chunks: 'all',
},
uiw: {
test: /[\\/]node_modules[\\/](@uiw)[\\/]/,
name: 'uiw-vendor',
chunks: 'all',
},
parse5: {
test: /[\\/]node_modules[\\/](parse5)[\\/]/,
name: 'parse5-vendor',
chunks: 'all',
},
},
},
};
}
return conf;
};
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@
"*.{js,jsx,tsx,ts,less,md,json}": "prettier --write"
},
"devDependencies": {
"@kkt/less-modules": "6.11.0",
"@kkt/less-modules": "7.0.5",
"@types/react": "17.0.38",
"@types/react-dom": "17.0.11",
"@types/react-redux": "7.1.21",
"@types/react-router-dom": "5.3.2",
"husky": "7.0.4",
"lint-staged": "11.2.6",
"prettier": "2.5.1",
"kkt": "6.11.0"
"kkt": "7.0.5"
},
"eslintConfig": {
"extends": [
Expand Down

1 comment on commit 078d1a2

@vercel
Copy link

@vercel vercel bot commented on 078d1a2 Jan 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.