1 Star 0 Fork 1

花中笑/json-viewer

forked from uiw/json-viewer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.kktrc.ts 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
小弟调调 提交于 2022-01-12 03:21 . chore: Modify editor.
import webpack, { Configuration } from 'webpack';
import lessModules from '@kkt/less-modules';
import { LoaderConfOptions } from 'kkt';
import pkg from './package.json';
export default (conf: Configuration, env: 'development' | 'production', options: LoaderConfOptions) => {
conf = lessModules(conf, env, options);
// Get the project version.
conf.plugins!.push(
new webpack.DefinePlugin({
VERSION: JSON.stringify(pkg.version),
}),
);
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',
},
refractor: {
test: /[\\/]node_modules[\\/](refractor)[\\/]/,
name: 'refractor-vendor',
chunks: 'all',
},
codemirror: {
test: /[\\/]node_modules[\\/](@codemirror)[\\/]/,
name: 'codemirror-vendor',
chunks: 'all',
},
reactjsonview: {
test: /[\\/]node_modules[\\/](react-json-view)[\\/]/,
name: 'react-json-view-vendor',
chunks: 'all',
},
lezer: {
test: /[\\/]node_modules[\\/](@lezer)[\\/]/,
name: 'lezer-vendor',
chunks: 'all',
},
},
},
};
}
return conf;
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/yanggg1133/json-viewer.git
git@gitee.com:yanggg1133/json-viewer.git
yanggg1133
json-viewer
json-viewer
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385