From 6040257ca3785b87f4fa77bbcc5d64c4a0c4af2c Mon Sep 17 00:00:00 2001 From: Mathieu TUDISCO Date: Tue, 5 May 2020 23:56:03 +0200 Subject: [PATCH] fix(webpack): allow hmr client path to be set (#7318) --- packages/webpack/src/config/client.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/webpack/src/config/client.js b/packages/webpack/src/config/client.js index 0492fe5cf5..7f4d1dfa79 100644 --- a/packages/webpack/src/config/client.js +++ b/packages/webpack/src/config/client.js @@ -186,17 +186,18 @@ export default class WebpackClientConfig extends WebpackBaseConfig { const { client = {} } = hotMiddleware || {} const { ansiColors, overlayStyles, ...options } = client + const hotMiddlewareClientOptions = { reload: true, timeout: 30000, ansiColors: JSON.stringify(ansiColors), overlayStyles: JSON.stringify(overlayStyles), + path: `${router.base}/__webpack_hmr/${this.name}`.replace(/\/\//g, '/'), ...options, name: this.name } - const clientPath = `${router.base}/__webpack_hmr/${this.name}` - const hotMiddlewareClientOptionsStr = - `${querystring.stringify(hotMiddlewareClientOptions)}&path=${clientPath}`.replace(/\/\//g, '/') + + const hotMiddlewareClientOptionsStr = querystring.stringify(hotMiddlewareClientOptions) // Entry points config.entry = Object.assign({}, config.entry, {