Commit 65716baab9e7abded375960e2f512c342493b6d3
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,7 +12,7 @@ const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') | ||
12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') | 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') |
13 | 13 | ||
14 | const env = require('../config/prod.env') | 14 | const env = require('../config/prod.env') |
15 | - | 15 | +const Version = new Date().getTime() |
16 | const webpackConfig = merge(baseWebpackConfig, { | 16 | const webpackConfig = merge(baseWebpackConfig, { |
17 | module: { | 17 | module: { |
18 | rules: utils.styleLoaders({ | 18 | rules: utils.styleLoaders({ |
@@ -25,8 +25,8 @@ const webpackConfig = merge(baseWebpackConfig, { | @@ -25,8 +25,8 @@ const webpackConfig = merge(baseWebpackConfig, { | ||
25 | output: { | 25 | output: { |
26 | publicPath: './', | 26 | publicPath: './', |
27 | path: config.build.assetsRoot, | 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 | plugins: [ | 31 | plugins: [ |
32 | // http://vuejs.github.io/vue-loader/en/workflow/production.html | 32 | // http://vuejs.github.io/vue-loader/en/workflow/production.html |