Skip to content

Commit

Permalink
fix: revert file name hashing in dev mode
Browse files Browse the repository at this point in the history
closes #2492

The change was intended to mitigate the problem that Safari keeps caching
dev bundles.

But it caused several unintended bugs:
1. [Hashes in file names with HMR enabled might cause memory leaks](webpack/webpack-dev-server#377 (comment))
2. Moving the hash to file query also breaks many webpack loaders:
  1. [mocha-webpack](vuejs/vue-cli@f683583)
  2. [django-webpack-loader](vuejs/vue-cli#2492))

So till we find a better way to solve this issue, hashes in dev bundles
should be removed.
  • Loading branch information
haoqunjiang committed Sep 12, 2018
1 parent 5d03d6c commit 8166123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = (api, options) => {
.end()
.output
.path(api.resolve(options.outputDir))
.filename(isLegacyBundle ? '[name]-legacy.js?[hash:8]' : '[name].js?[hash:8]')
.filename(isLegacyBundle ? '[name]-legacy.js' : '[name].js')
.publicPath(options.baseUrl)

webpackConfig.resolve
Expand Down

0 comments on commit 8166123

Please sign in to comment.