mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
fix(webpack): allow hmr client path to be set (#7318)
This commit is contained in:
parent
8c7228f1e8
commit
6040257ca3
@ -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, {
|
||||
|
Loading…
Reference in New Issue
Block a user