2023-10-16 18:23:13 +08:00
|
|
|
const {defineConfig} = require('@vue/cli-service');
|
2022-09-21 01:28:27 +08:00
|
|
|
|
2022-09-18 15:17:13 +08:00
|
|
|
module.exports = defineConfig({
|
2022-09-21 01:28:27 +08:00
|
|
|
transpileDependencies: true,
|
2022-09-22 18:39:52 +08:00
|
|
|
productionSourceMap: false,
|
2022-09-21 01:28:27 +08:00
|
|
|
configureWebpack: {
|
2023-10-16 18:23:13 +08:00
|
|
|
plugins: []
|
2022-09-22 19:55:47 +08:00
|
|
|
},
|
|
|
|
chainWebpack: (config) => {
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
|
|
config.plugin('webpack-report')
|
|
|
|
.use(require('webpack-bundle-analyzer')
|
2023-10-16 18:23:13 +08:00
|
|
|
.BundleAnalyzerPlugin, [{analyzerMode: 'static', openAnalyzer: false}]);
|
2022-09-22 19:55:47 +08:00
|
|
|
config.plugins.delete('prefetch')
|
|
|
|
}
|
2022-09-21 01:28:27 +08:00
|
|
|
}
|
2022-09-18 15:17:13 +08:00
|
|
|
})
|