Commit 65716baab9e7abded375960e2f512c342493b6d3

Authored by 刘淇
1 parent ff1c2a45

跳转

Showing 1 changed file with 3 additions and 3 deletions
build/webpack.prod.conf.js
... ... @@ -12,7 +12,7 @@ const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 12 const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13 13  
14 14 const env = require('../config/prod.env')
15   -
  15 +const Version = new Date().getTime()
16 16 const webpackConfig = merge(baseWebpackConfig, {
17 17 module: {
18 18 rules: utils.styleLoaders({
... ... @@ -25,8 +25,8 @@ const webpackConfig = merge(baseWebpackConfig, {
25 25 output: {
26 26 publicPath: './',
27 27 path: config.build.assetsRoot,
28   - filename: utils.assetsPath('js/[name].[chunkhash].js'),
29   - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
  28 + filename: utils.assetsPath('js/[name].[chunkhash].'+Version+'.js'),
  29 + chunkFilename: utils.assetsPath('js/[id].[chunkhash].'+Version+'.js')
30 30 },
31 31 plugins: [
32 32 // http://vuejs.github.io/vue-loader/en/workflow/production.html
... ...