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, {