Skip to content

Commit 078d1a2

Browse files
committed
chore(deps): update dependency kkt to v7.
Upgrade react-scripts to v5, Support Webpack 5.x kktjs/kkt#198
1 parent bf59d29 commit 078d1a2

File tree

2 files changed

+39
-26
lines changed

2 files changed

+39
-26
lines changed

.kktrc.ts

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,45 @@ export default (conf: Configuration, env: 'production' | 'development', options:
1313
}),
1414
);
1515

16-
conf.optimization = {
17-
...conf.optimization,
18-
splitChunks: {
19-
cacheGroups: {
20-
reactvendor: {
21-
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
22-
name: 'react-vendor',
23-
chunks: 'all',
24-
},
25-
katex: {
26-
test: /[\\/]node_modules[\\/](katex)[\\/]/,
27-
name: 'katex-vendor',
28-
chunks: 'all',
29-
},
30-
prismjs: {
31-
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
32-
name: 'prismjs-vendor',
33-
chunks: 'async',
34-
},
35-
},
36-
},
37-
};
38-
3916
if (env === 'production') {
4017
conf.output = { ...conf.output, publicPath: './' };
18+
conf.optimization = {
19+
...conf.optimization,
20+
splitChunks: {
21+
cacheGroups: {
22+
reactvendor: {
23+
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
24+
name: 'react-vendor',
25+
chunks: 'all',
26+
},
27+
katex: {
28+
test: /[\\/]node_modules[\\/](katex)[\\/]/,
29+
name: 'katex-vendor',
30+
chunks: 'all',
31+
},
32+
prismjs: {
33+
test: /[\\/]node_modules[\\/](refractor)[\\/]/,
34+
name: 'refractor-vendor',
35+
chunks: 'all',
36+
},
37+
codemirror: {
38+
test: /[\\/]node_modules[\\/](@codemirror)[\\/]/,
39+
name: 'codemirror-vendor',
40+
chunks: 'all',
41+
},
42+
uiw: {
43+
test: /[\\/]node_modules[\\/](@uiw)[\\/]/,
44+
name: 'uiw-vendor',
45+
chunks: 'all',
46+
},
47+
parse5: {
48+
test: /[\\/]node_modules[\\/](parse5)[\\/]/,
49+
name: 'parse5-vendor',
50+
chunks: 'all',
51+
},
52+
},
53+
},
54+
};
4155
}
4256
return conf;
4357
};

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@
4545
"*.{js,jsx,tsx,ts,less,md,json}": "prettier --write"
4646
},
4747
"devDependencies": {
48-
"@kkt/less-modules": "6.11.0",
48+
"@kkt/less-modules": "7.0.5",
4949
"@types/react": "17.0.38",
5050
"@types/react-dom": "17.0.11",
5151
"@types/react-redux": "7.1.21",
52-
"@types/react-router-dom": "5.3.2",
5352
"husky": "7.0.4",
5453
"lint-staged": "11.2.6",
5554
"prettier": "2.5.1",
56-
"kkt": "6.11.0"
55+
"kkt": "7.0.5"
5756
},
5857
"eslintConfig": {
5958
"extends": [

0 commit comments

Comments
 (0)