Skip to content

Commit 32689f7

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

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

Diff for: .kktrc.ts

+27-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,39 @@ export default (conf: Configuration, env: 'production' | 'development', options:
1616
path.resolve(process.cwd(), 'src'),
1717
]
1818
});
19-
// conf.resolve!.alias = { '@uiw/react-monacoeditor': process.cwd() };
2019
// Get the project version.
2120
conf.plugins!.push(new webpack.DefinePlugin({
2221
VERSION: JSON.stringify(pkg.version),
2322
}));
2423
if (env === 'production') {
2524
conf.output = { ...conf.output, publicPath: './' };
25+
conf.optimization = {
26+
...conf.optimization,
27+
splitChunks: {
28+
cacheGroups: {
29+
reactvendor: {
30+
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
31+
name: 'react-vendor',
32+
chunks: 'all',
33+
},
34+
refractor: {
35+
test: /[\\/]node_modules[\\/](refractor)[\\/]/,
36+
name: 'refractor-prismjs-vendor',
37+
chunks: 'all',
38+
},
39+
runtime: {
40+
test: /[\\/]node_modules[\\/](@babel)[\\/]/,
41+
name: 'babel-vendor',
42+
chunks: 'all',
43+
},
44+
parse5: {
45+
test: /[\\/]node_modules[\\/](parse5)[\\/]/,
46+
name: 'parse5-vendor',
47+
chunks: 'all',
48+
},
49+
}
50+
}
51+
}
2652
}
2753
return conf;
2854
}

Diff for: package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
"@babel/runtime": ">=7.10.0"
2525
},
2626
"devDependencies": {
27-
"@kkt/less-modules": "6.11.0",
28-
"@kkt/raw-modules": "6.11.0",
29-
"@kkt/scope-plugin-options": "6.11.0",
30-
"@types/react": "17.0.20",
31-
"@types/react-dom": "17.0.9",
27+
"@kkt/less-modules": "7.0.5",
28+
"@kkt/raw-modules": "7.0.5",
29+
"@kkt/scope-plugin-options": "7.0.5",
30+
"@types/react": "17.0.38",
31+
"@types/react-dom": "17.0.11",
3232
"@uiw/react-github-corners": "1.5.3",
33-
"@uiw/react-markdown-preview": "3.3.2",
33+
"@uiw/react-markdown-preview": "3.4.7",
3434
"compile-less-cli": "1.8.8",
3535
"react": "17.0.2",
3636
"react-dom": "17.0.2",
37-
"kkt": "6.11.0",
37+
"kkt": "7.0.5",
3838
"tsbb": "3.1.9"
3939
},
4040
"eslintConfig": {

Diff for: src/react-app-env.d.ts

-1
This file was deleted.

0 commit comments

Comments
 (0)