From 2f1745492c8887551fbdf03cc59eae3184370ba3 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 10 Nov 2018 02:28:57 +0330 Subject: [PATCH] fix: revert back afterPlugins to call _ensureState --- src/plugin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugin.js b/src/plugin.js index 0555e40..9733485 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -143,6 +143,11 @@ export default class WebpackBarPlugin extends ProgressPlugin { // Apply base hooks super.apply(compiler); + // Register our state after all plugins initialized + hook(compiler, 'afterPlugins', () => { + this._ensureState(); + }); + // Hook into the compiler before a new compilation is created. hook(compiler, 'compile', () => { this._ensureState();