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
kktjs/kkt#198
  • Loading branch information
jaywcjlove committed Jan 10, 2022
1 parent 53a95c4 commit d01e0da
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 13 deletions.
27 changes: 27 additions & 0 deletions .kktrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,33 @@ export default (conf: Configuration, env: 'production' | 'development', 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[\\/](refractor)[\\/]/,
name: 'refractor-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;
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"type": "git",
"url": "https://github.com/uiwjs/react-shields"
},
"author": "",
"author": "Kenny Wong <wowohoo@qq.com>",
"license": "MIT",
"files": [
"src",
Expand All @@ -31,17 +31,17 @@
},
"dependencies": {},
"devDependencies": {
"@kkt/less-modules": "6.11.0",
"@kkt/raw-modules": "6.11.0",
"@kkt/scope-plugin-options": "6.11.0",
"@types/react": "17.0.20",
"@types/react-dom": "17.0.9",
"@uiw/react-github-corners": "1.5.1",
"@kkt/less-modules": "7.0.5",
"@kkt/raw-modules": "7.0.5",
"@kkt/scope-plugin-options": "7.0.5",
"@types/react": "17.0.38",
"@types/react-dom": "17.0.11",
"@uiw/react-github-corners": "1.5.3",
"@uiw/react-markdown-preview": "3.4.7",
"kkt": "6.11.0",
"kkt": "7.0.5",
"react": "17.0.2",
"react-dom": "17.0.2",
"tsbb": "3.1.5"
"tsbb": "3.5.4"
},
"eslintConfig": {
"extends": [
Expand Down
13 changes: 9 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
// "module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"declaration": true,
"baseUrl": "website",
"jsx": "react"
"jsx": "react-jsx",
"noFallthroughCasesInSwitch": true,
"noEmit": true
},
"include": ["website", "src/**/*"]
}
"include": [
"website",
"src",
".kktrc.ts"
]
}

0 comments on commit d01e0da

Please sign in to comment.