fix: loadResources after every build

This commit is contained in:
Atinux 2017-10-31 18:33:25 +01:00
parent 76aca28cdc
commit 8318ce7510

View File

@ -435,6 +435,9 @@ export default class Builder {
// Resolve only when compiler emit done event
compiler.plugin('done', async (stats) => {
await this.nuxt.callHook('build:compiled', { name, compiler, stats })
// Reload renderer if available
this.nuxt.renderer.loadResources(sharedFS || fs)
// Resolve on next tick
process.nextTick(resolve)
})
// --- Dev Build ---
@ -475,10 +478,6 @@ export default class Builder {
}
})
}))
// Reload renderer if available
if (this.nuxt.renderer) {
this.nuxt.renderer.loadResources(sharedFS || fs)
}
}
webpackDev(compiler) {