Merge branch 'dev'
Showing
1 changed file
with
5 additions
and
0 deletions
1 | 'use strict' | 1 | 'use strict' |
2 | const path = require('path') | 2 | const path = require('path') |
3 | const Timestamp = new Date().getTime(); | ||
3 | function resolve (dir) { | 4 | function resolve (dir) { |
4 | return path.join(__dirname, dir) | 5 | return path.join(__dirname, dir) |
5 | } | 6 | } |
... | @@ -67,6 +68,10 @@ module.exports = { | ... | @@ -67,6 +68,10 @@ module.exports = { |
67 | '@': resolve('src') | 68 | '@': resolve('src') |
68 | } | 69 | } |
69 | }, | 70 | }, |
71 | output: { // 输出重构 打包编译后的 文件名称 【模块名称.版本号.时间戳】 | ||
72 | filename: `static/js/[name].${Timestamp}.js`, | ||
73 | chunkFilename: `static/js/[name].${Timestamp}.js` | ||
74 | }, | ||
70 | devtool: process.env.NODE_ENV === 'development' ? '#eval-source-map' : false | 75 | devtool: process.env.NODE_ENV === 'development' ? '#eval-source-map' : false |
71 | }, | 76 | }, |
72 | // chainWebpack通过链式编程的形式,来修改默认的webpack配置 | 77 | // chainWebpack通过链式编程的形式,来修改默认的webpack配置 | ... | ... |
-
Please register or sign in to post a comment