fix: h5 framework compact option

This commit is contained in:
qiang 2022-06-28 16:32:56 +08:00
parent e94c80c7d5
commit ce5cdba317

View File

@ -49,7 +49,8 @@ process.UNI_LIBRARIES.forEach(libraryName => {
}
])
})
module.exports = {
const config = {
presets: [
[
'@vue/app',
@ -60,4 +61,16 @@ module.exports = {
]
],
plugins
}
}
const UNI_H5_TEST = '**/@dcloudio/uni-h5/dist/index.umd.min.js'
if (process.env.NODE_ENV === 'production') {
config.overrides = [{
test: UNI_H5_TEST,
compact: true,
}]
} else {
config.ignore = [UNI_H5_TEST]
}
module.exports = config