let filePath = ''
let Timestamp = ''
if (process.env.UNI_PLATFORM === 'h5') {
filePath = 'static/js/';
Timestamp = '.' + new Date().getTime();
}
module.exports = {
configureWebpack: {
output: {
filename: `${filePath}[name]${Timestamp}.js`,
chunkFilename: `${filePath}[name]${Timestamp}.js`
},
},
}
打包后的项目没有任何变化,但是vue2使用以上配置是生效的
l***@163.com (作者)
感谢大佬
2024-03-26 13:47