diff --git a/lib/builder/webpack/plugins/vue/util.mjs b/lib/builder/webpack/plugins/vue/util.mjs index fb58bc0bac..b464fb0f5b 100644 --- a/lib/builder/webpack/plugins/vue/util.mjs +++ b/lib/builder/webpack/plugins/vue/util.mjs @@ -24,14 +24,7 @@ export const validate = compiler => { export const onEmit = (compiler, name, hook) => { if (compiler.hooks) { // Webpack >= 4.0.0 - compiler.hooks.emit.tap(name, - (compilation) => new Promise((resolve, reject) => { - try { - hook(compilation, resolve) - } catch (e) { - reject(e) - } - })) + compiler.hooks.emit.tapAsync(name, hook) } else { // Webpack < 4.0.0 compiler.plugin('emit', hook)