chore: move the hash part in filename to query parameters (dev mode)

Development builts with HMR enabled have a bunch of problems with hashes
in filenames (e.g., https://github.com/webpack/webpack-dev-server/issues/377#issuecomment-241258405).

But to mitigate the Safari caching issue, hashes cannot be omitted.
So move them to query parameters to see if this works.
This commit is contained in:
Haoqun Jiang
2018-09-10 19:54:44 +08:00
parent d0320eb8c2
commit 52dbdf88ff

View File

@@ -33,7 +33,7 @@ module.exports = (api, options) => {
.end()
.output
.path(api.resolve(options.outputDir))
.filename(isLegacyBundle ? '[name]-legacy.[hash:8].js' : '[name].[hash:8].js')
.filename(isLegacyBundle ? '[name]-legacy.js?[hash:8]' : '[name].js?[hash:8]')
.publicPath(options.baseUrl)
webpackConfig.resolve