Commit e18764cb authored by 邓晓峰's avatar 邓晓峰

feat: 集成报表菜单

parent e62f957d
Pipeline #42995 skipped with stages
......@@ -28,15 +28,15 @@ rm(
console.log(err)
throw err
}
// process.stdout.write(`${stats.toString({
// colors: true,
// color: true,
// progress: true,
// modules: false,
// children: false,
// chunks: true,
// chunkModules: true
// }) }\n\n`)
process.stdout.write(`${stats.toString({
colors: true,
color: true,
progress: true,
modules: false,
children: false,
chunks: true,
chunkModules: true
}) }\n\n`)
printFileSizes(stats, path.relative(process.cwd(), webpackConfig.output.path));
if (stats.hasErrors()) {
......
......@@ -18,71 +18,70 @@ module.exports = require('./webpack.base.babel')({
// chunkFilename: '[name].[chunkhash].chunk.js',
// },
// optimization: {
// minimize: true,
// minimizer: [
// new TerserPlugin({
// terserOptions: {
// warnings: false,
// compress: {
// comparisons: false,
// },
// drop_debugger: true,
// drop_console: true,
// pure_funcs: ['console.log'],
// parse: {},
// mangle: true,
// output: {
// comments: false,
// ascii_only: true,
// },
// },
// parallel: true,
// cache: true,
// sourceMap: true,
// }),
// ],
// nodeEnv: 'production',
// // chunkIds: "deterministic",
// // moduleIds: "deterministic",
// usedExports: true,
// sideEffects: true,
// concatenateModules: true,
// runtimeChunk: 'single',
// splitChunks: {
// // maxSize: 100 * 1024, // 控制包的最大字节数
// // minSize: 10 * 1024, // 控制包的最小字节数
// cacheGroups: {
// vendor: {
// chunks: 'all',
// minSize: 0,
// maxInitialRequests: 10,
// test: /[\\/]node_modules[\\/]/,
// name(module) {
// const packageName = module.context.match(
// /[\\/]node_modules[\\/](.*?)([\\/]|$)/,
// )[1];
// return `npm.${packageName.replace('@', '')}`;
// },
// },
// bizComponent: {
// chunks: 'all',
// minSize: 0,
// maxInitialRequests: 10,
// test: /[\\/]src[\\/]components[\\/]/,
// name: 'biz-component',
// },
// react: {
// chunks: 'all',
// minSize: 0,
// maxInitialRequests: 10,
// test: /[\\/]node_modules[\\/]react-dom[\\/]/,
// name: 'react-dom',
// }
// },
// },
// },
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
warnings: false,
compress: {
comparisons: false,
},
drop_debugger: true,
drop_console: true,
pure_funcs: ['console.log'],
parse: {},
mangle: true,
output: {
comments: false,
ascii_only: true,
},
},
parallel: true,
cache: true,
sourceMap: true,
}),
],
nodeEnv: 'production',
// chunkIds: "deterministic",
// moduleIds: "deterministic",
usedExports: true,
sideEffects: true,
concatenateModules: true,
runtimeChunk: 'single',
splitChunks: {
maxSize: 100 * 1024, // 控制包的最大字节数
minSize: 10 * 1024, // 控制包的最小字节数
cacheGroups: {
vendor: {
chunks: 'all',
minSize: 0,
maxInitialRequests: 10,
test: /[\\/]node_modules[\\/]/,
name(module) {
const packageName = module.context.match(
/[\\/]node_modules[\\/](.*?)([\\/]|$)/,
)[1];
return `npm.${packageName.replace('@', '')}`;
},
},
bizComponent: {
chunks: 'all',
minSize: 0,
maxInitialRequests: 10,
test: /[\\/]src[\\/]components[\\/]/,
name: 'biz-component',
},
react: {
chunks: 'all',
minSize: 0,
maxInitialRequests: 10,
test: /[\\/]node_modules[\\/]react-dom[\\/]/,
name: 'react-dom',
}
},
},
},
plugins: [
new CompressionPlugin({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment