Changpeng Duan 4 роки тому
батько
коміт
b6c3c7a951
2 змінених файлів з 11 додано та 1 видалено
  1. 3 0
      pc/public/index.html
  2. 8 1
      pc/vue.config.js

+ 3 - 0
pc/public/index.html

@@ -5,6 +5,9 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <!--    <meta name="viewport" content="width=device-width,initial-scale=1.0">-->
     <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
+    <meta http-equiv="pragram" content="no-cache" />
+    <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"  />
+    <meta http-equiv="expires" content="0" />
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= htmlWebpackPlugin.options.title %></title>
 </head>

+ 8 - 1
pc/vue.config.js

@@ -1,3 +1,4 @@
+const Timestamp = new Date().getTime();
 module.exports = {
     lintOnSave: false,
     devServer: {
@@ -17,7 +18,7 @@ module.exports = {
                     '^/bpi': '',
                 }
             },
-            '/cpi':{
+            '/cpi': {
                 target: 'http://192.168.0.62:9010/',
                 changeOrigin: true,
                 pathRewrite: {
@@ -26,6 +27,12 @@ module.exports = {
             }
         }
     },
+    configureWebpack: {
+        output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
+            filename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
+            chunkFilename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
+        }
+    },
     // 输出文件目录
     outputDir: 'D:/wwwroot/flyLongStaticPc/build',
 };