mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +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 { client = {} } = hotMiddleware || {}
|
||||||
const { ansiColors, overlayStyles, ...options } = client
|
const { ansiColors, overlayStyles, ...options } = client
|
||||||
|
|
||||||
const hotMiddlewareClientOptions = {
|
const hotMiddlewareClientOptions = {
|
||||||
reload: true,
|
reload: true,
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
ansiColors: JSON.stringify(ansiColors),
|
ansiColors: JSON.stringify(ansiColors),
|
||||||
overlayStyles: JSON.stringify(overlayStyles),
|
overlayStyles: JSON.stringify(overlayStyles),
|
||||||
|
path: `${router.base}/__webpack_hmr/${this.name}`.replace(/\/\//g, '/'),
|
||||||
...options,
|
...options,
|
||||||
name: this.name
|
name: this.name
|
||||||
}
|
}
|
||||||
const clientPath = `${router.base}/__webpack_hmr/${this.name}`
|
|
||||||
const hotMiddlewareClientOptionsStr =
|
const hotMiddlewareClientOptionsStr = querystring.stringify(hotMiddlewareClientOptions)
|
||||||
`${querystring.stringify(hotMiddlewareClientOptions)}&path=${clientPath}`.replace(/\/\//g, '/')
|
|
||||||
|
|
||||||
// Entry points
|
// Entry points
|
||||||
config.entry = Object.assign({}, config.entry, {
|
config.entry = Object.assign({}, config.entry, {
|
||||||
|
Loading…
Reference in New Issue
Block a user