Commit 152cb2fb authored by 前端-许佳敏's avatar 前端-许佳敏

chore: 生产环境不分割代码

parent 39ed1795
......@@ -30,45 +30,45 @@ export default defineConfig({
chainWebpack(config) {
config.plugin('antd-dayjs-webpack-plugin').use(AntdDayjsWebpackPlugin)
config.plugin('lodash-webpack-plugin').use(LodashModuleReplacementPlugin)
config.merge({
optimization: {
minimize: true,
splitChunks: {
chunks: 'all',
minSize: 1024 * 30,
minChunks: 2,
automaticNameDelimiter: '.',
cacheGroups: {
vendor: {
name: 'vendors',
test({ resource }) {
return /[\\/]node_modules[\\/]/.test(resource);
},
priority: -10,
},
services: {
name: 'services',
test({ resource }) {
return /[\\/]services[\\/]/.test(resource)
},
},
"lingxi-disign": {
name: '@lingxi-design',
test({ resource }) {
return /[\\/]@lingxi-design[\\/]/.test(resource)
},
priority: 30,
},
styles: {
name: 'styles',
test: /\.(le|c)ss$/,
chunks: 'all',
enforce: true,
}
},
},
},
});
// config.merge({
// optimization: {
// minimize: true,
// splitChunks: {
// chunks: 'all',
// minSize: 1024 * 30,
// minChunks: 2,
// automaticNameDelimiter: '.',
// cacheGroups: {
// vendor: {
// name: 'vendors',
// test({ resource }) {
// return /[\\/]node_modules[\\/]/.test(resource);
// },
// priority: -10,
// },
// services: {
// name: 'services',
// test({ resource }) {
// return /[\\/]services[\\/]/.test(resource)
// },
// },
// "lingxi-disign": {
// name: '@lingxi-design',
// test({ resource }) {
// return /[\\/]@lingxi-design[\\/]/.test(resource)
// },
// priority: 30,
// },
// styles: {
// name: 'styles',
// test: /\.(le|c)ss$/,
// chunks: 'all',
// enforce: true,
// }
// },
// },
// },
// });
config.module
.rule('svg')
.exclude.add(/pages/)
......
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