Skip to content

Commit 31f69c6

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

4 files changed

Lines changed: 41 additions & 34 deletions

File tree

.kktrc.ts

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,40 @@ export default (conf: Configuration, env: string, options: LoaderConfOptions) =>
1919
conf.plugins!.push(new webpack.DefinePlugin({
2020
VERSION: JSON.stringify(pkg.version),
2121
}));
22-
conf.optimization = {
23-
...conf.optimization,
24-
splitChunks: {
25-
cacheGroups: {
26-
reactvendor: {
27-
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
28-
name: 'react-vendor',
29-
chunks: 'all',
30-
},
31-
katex: {
32-
test: /[\\/]node_modules[\\/](katex)[\\/]/,
33-
name: 'katex-vendor',
34-
chunks: 'all',
35-
},
36-
micromark: {
37-
test: /[\\/]node_modules[\\/](micromark)[\\/]/,
38-
name: 'micromark-vendor',
39-
chunks: 'all',
40-
},
41-
prismjs: {
42-
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
43-
name: 'prismjs-vendor',
44-
chunks: 'async',
45-
},
46-
},
47-
},
48-
};
4922
if (env === 'production') {
5023
conf.output = { ...conf.output, publicPath: './' };
24+
conf.optimization = {
25+
...conf.optimization,
26+
splitChunks: {
27+
cacheGroups: {
28+
reactvendor: {
29+
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
30+
name: 'react-vendor',
31+
chunks: 'all',
32+
},
33+
prismjs: {
34+
test: /[\\/]node_modules[\\/](prismjs)[\\/]/,
35+
name: 'prismjs-vendor',
36+
chunks: 'all',
37+
},
38+
micromark: {
39+
test: /[\\/]node_modules[\\/](micromark)[\\/]/,
40+
name: 'micromark-vendor',
41+
chunks: 'all',
42+
},
43+
uiw: {
44+
test: /[\\/]node_modules[\\/](\@uiw)[\\/]/,
45+
name: 'uiw-vendor',
46+
chunks: 'all',
47+
},
48+
parse5: {
49+
test: /[\\/]node_modules[\\/](parse5)[\\/]/,
50+
name: 'parse5-vendor',
51+
chunks: 'all',
52+
},
53+
},
54+
},
55+
};
5156
}
5257
return conf;
5358
}

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"css:watch": "compile-less -d src -o esm --watch",
1414
"css:build:dist": "compile-less -d src --combine dist.css --rm-global",
1515
"watch": "tsbb watch",
16-
"build": "tsbb build && npm run css:build && npm run css:build:dist"
16+
"build": "tsbb build && npm run css:build && npm run css:build:dist",
17+
"map": "source-map-explorer build/static/js/*.js --html build/website-result.html"
1718
},
1819
"repository": {
1920
"type": "git",
@@ -39,15 +40,16 @@
3940
"devDependencies": {
4041
"@types/react": "17.0.38",
4142
"@types/react-dom": "17.0.11",
42-
"@kkt/less-modules": "6.11.0",
43-
"@kkt/raw-modules": "6.11.0",
44-
"@kkt/scope-plugin-options": "6.11.0",
43+
"@kkt/less-modules": "7.0.5",
44+
"@kkt/raw-modules": "7.0.5",
45+
"@kkt/scope-plugin-options": "7.0.5",
4546
"@uiw/react-github-corners": "1.5.3",
4647
"@uiw/react-markdown-preview": "3.4.7",
4748
"compile-less-cli": "1.8.11",
48-
"kkt": "6.11.0",
49+
"kkt": "7.0.5",
4950
"react": "17.0.2",
5051
"react-dom": "17.0.2",
52+
"source-map-explorer": "2.5.2",
5153
"tsbb": "3.5.4"
5254
},
5355
"eslintConfig": {

src/react-app-env.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"include": [
2626
"website",
27-
"src/**/*"
27+
"src",
28+
".kktrc.ts"
2829
]
2930
}

0 commit comments

Comments
 (0)