mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
refactor: use resloveAlias for watch
This commit is contained in:
parent
5ddc394a50
commit
85a8af570d
@ -400,8 +400,8 @@ export default class Builder {
|
||||
r,
|
||||
wp,
|
||||
wChunk,
|
||||
resolvePath: this.nuxt.resolvePath.bind(this.nuxt),
|
||||
resolveAlias: this.nuxt.resolveAlias.bind(this.nuxt),
|
||||
resolvePath: this.nuxt.resolvePath,
|
||||
resolveAlias: this.nuxt.resolveAlias,
|
||||
relativeToBuild: this.relativeToBuild
|
||||
}
|
||||
})
|
||||
@ -639,7 +639,7 @@ export default class Builder {
|
||||
})
|
||||
|
||||
const nuxtRestartWatch = _.concat(
|
||||
this.options.watch.map(r),
|
||||
this.options.watch.map(this.nuxt.resolveAlias),
|
||||
path.join(this.options.rootDir, 'nuxt.config.js')
|
||||
)
|
||||
this.watchers.restart = chokidar
|
||||
|
@ -37,6 +37,8 @@ export default class Nuxt {
|
||||
this.renderAndGetWindow = this.renderer.renderAndGetWindow.bind(
|
||||
this.renderer
|
||||
)
|
||||
this.resolvePath = this.resolvePath.bind(this)
|
||||
this.resolveAlias = this.resolveAlias.bind(this)
|
||||
|
||||
// ESM Loader
|
||||
this.esm = esm(module, {})
|
||||
|
Loading…
Reference in New Issue
Block a user