From bf1065f438bb3e048f5285941cd92c84c0c6e7c9 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 3 Jul 2017 15:58:10 +0430 Subject: [PATCH] more webpack friendly tappable hooks --- lib/builder/builder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/builder/builder.js b/lib/builder/builder.js index 8f9e859e95..776fefb37f 100644 --- a/lib/builder/builder.js +++ b/lib/builder/builder.js @@ -316,7 +316,7 @@ export default class Builder extends Tapable { this.nuxt.renderer.loadResources(sharedFS || fs) } - await this.applyPluginsAsync('compiled', { builder: this, stats }) + await this.applyPluginsAsync('done', { builder: this, stats }) }) // Add dev Stuff @@ -327,7 +327,7 @@ export default class Builder extends Tapable { await this.applyPluginsAsync('compile', { builder: this, compiler: this.compiler }) // Start Builds - return parallel(this.compiler.compilers, compiler => new Promise((resolve, reject) => { + await parallel(this.compiler.compilers, compiler => new Promise((resolve, reject) => { if (this.options.dev) { // --- Dev Build --- if (compiler.options.name === 'client') { @@ -361,6 +361,8 @@ export default class Builder extends Tapable { }) } })) + + await this.applyPluginsAsync('compiled', this) } webpackDev () {