diff --git a/core/loader/src/plugin.ts b/core/loader/src/plugin.ts index b3e55bc0c..1e311076e 100644 --- a/core/loader/src/plugin.ts +++ b/core/loader/src/plugin.ts @@ -27,7 +27,7 @@ export class LoaderPlugin { apply(compiler: webpack.Compiler) { this.replaceRuntimeModule(compiler); compiler.hooks.compilation.tap(LoaderPlugin.pluginName, compilation => { - compilation.hooks.optimizeChunkAssets.tap( + compilation.hooks.optimizeChunkAssets.tapPromise( LoaderPlugin.pluginName, async chunks => { const jsFiles: string[] = [];