vue cli3.xパッケージ更新バージョン、ブラウザキャッシュの問題を解決します

<meta http-equiv="pragram" content="no-cache">
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
在 vue.config.js 的文件中加入下面这段话

// vue.config.js
const Timestamp = new Date().getTime();
module.exports = {
  configureWebpack: { // webpack 配置
    output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
      filename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
      chunkFilename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
    },
  },
...
}

おすすめ

転載: blog.csdn.net/diaojw090/article/details/107971805