mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix memory leak on restart nuxt-dev (#2190)
This commit is contained in:
parent
8550bcd684
commit
4c808c90ab
@ -449,10 +449,16 @@ export default class Builder {
|
||||
return
|
||||
}
|
||||
// Server, build and watch for changes
|
||||
compiler.watch(this.options.watchers.webpack, (err) => {
|
||||
const watching = compiler.watch(this.options.watchers.webpack, (err) => {
|
||||
/* istanbul ignore if */
|
||||
if (err) return reject(err)
|
||||
})
|
||||
|
||||
// Stop watching on nuxt.close()
|
||||
this.nuxt.hook('close', () => {
|
||||
watching.close()
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
// --- Production Build ---
|
||||
|
Loading…
Reference in New Issue
Block a user