diff --git a/lib/builder/builder.js b/lib/builder/builder.js index 1dbef90a59..b5a51aee9b 100644 --- a/lib/builder/builder.js +++ b/lib/builder/builder.js @@ -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) {