You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
508 B
16 lines
508 B
1 month ago
|
/** @type {import('@vue/cli-service').ServicePlugin} */
|
||
|
module.exports = (api, options) => {
|
||
|
api.chainWebpack(webpackConfig => {
|
||
|
if (process.env.NODE_ENV === 'production') {
|
||
|
webpackConfig
|
||
|
.mode('production')
|
||
|
.devtool(options.productionSourceMap ? 'source-map' : false)
|
||
|
|
||
|
// disable optimization during tests to speed things up
|
||
|
if (process.env.VUE_CLI_TEST && !process.env.VUE_CLI_TEST_MINIMIZE) {
|
||
|
webpackConfig.optimization.minimize(false)
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|