From 52dbdf88ffac1e7ed54d28fa45cce1a6b75fb50c Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Mon, 10 Sep 2018 19:54:44 +0800 Subject: [PATCH] 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. --- packages/@vue/cli-service/lib/config/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vue/cli-service/lib/config/base.js b/packages/@vue/cli-service/lib/config/base.js index 53377fb9a..df38b1028 100644 --- a/packages/@vue/cli-service/lib/config/base.js +++ b/packages/@vue/cli-service/lib/config/base.js @@ -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