找到vue项目中的 vue.config.js
// vue.config.js
const timeStamp = new Date().getTime()
const vueConfig = {
publicPath: './',
configureWebpack: {
//增加时间戳更新
output: {
filename: `js/[name].${timeStamp}.js`,
chunkFilename: `js/chunk.[id].${timeStamp}.js`
},
},
css: {
//增加时间戳更新
extract: {
filename: `css/[name].${timeStamp}.css`,
chunkFilename: `css/chunk[id].${timeStamp}.css`
},
},