diff --git a/packages/xarc-app-dev/src/lib/dev-admin/middleware.ts b/packages/xarc-app-dev/src/lib/dev-admin/middleware.ts index 4c2c1490d..7b4f4b6de 100644 --- a/packages/xarc-app-dev/src/lib/dev-admin/middleware.ts +++ b/packages/xarc-app-dev/src/lib/dev-admin/middleware.ts @@ -124,15 +124,14 @@ class Middleware { config.plugins = [ new webpack.HotModuleReplacementPlugin(), - new webpack.NoEmitOnErrorsPlugin() - ].concat(config.plugins); + new webpack.NoEmitOnErrorsPlugin(), + options.progress !== false && new webpack.ProgressPlugin({ profile: options.progressProfile }) + ] + .concat(config.plugins) + .filter(x => x); const compiler = webpack(config); - if (options.progress !== false) { - compiler.apply(new webpack.ProgressPlugin({ profile: options.progressProfile })); - } - const webpackDevOptions = _.merge( { // https: false, diff --git a/packages/xarc-webpack/src/plugins/done-plugin.ts b/packages/xarc-webpack/src/plugins/done-plugin.ts index 9f6c115c3..a827f5de0 100644 --- a/packages/xarc-webpack/src/plugins/done-plugin.ts +++ b/packages/xarc-webpack/src/plugins/done-plugin.ts @@ -6,7 +6,7 @@ class DonePlugin { } apply(compiler) { - compiler.plugin("done", () => { + compiler.hooks.done.tap("DonePlugin", () => { this._func(); }); }