소스 검색

提交移动端部署缓存

Lijy 2 년 전
부모
커밋
48b8e8e23f
1개의 변경된 파일18개의 추가작업 그리고 11개의 파일을 삭제
  1. 18 11
      fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

+ 18 - 11
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -2,19 +2,20 @@ const autoprefixer = require("autoprefixer");
 const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
+const Timestamp = new Date().getTime();
 
 // var ip = '47.101.180.183'
-// var ip = '192.168.2.30'
+var ip = '192.168.2.7'
 // var ip = '127.0.0.1'
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-for (var i in ifaces) {
-    for (var j in ifaces[i]) {
-        var val = ifaces[i][j]
-        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-            ip = val.address
-        }
-    }
-}
+// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// for (var i in ifaces) {
+//     for (var j in ifaces[i]) {
+//         var val = ifaces[i][j]
+//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+//             ip = val.address
+//         }
+//     }
+// }
 
 module.exports = {
     // 关闭eslint检查
@@ -64,5 +65,11 @@ module.exports = {
                 }
             }
         }
-    }
+    },
+    configureWebpack: { // webpack 配置
+        output: { // 输出重构  打包编译后的 文件名称  【模块名称.时间戳】
+            filename: `static/js/[name].${Timestamp}.js`,
+            chunkFilename: `static/js/[name].${Timestamp}.js`
+        },
+    },
 };