diff --git a/lib/esm/ModuleChunkLoadingPlugin.js b/lib/esm/ModuleChunkLoadingPlugin.js index 5c984a596..6bbd76ebb 100644 --- a/lib/esm/ModuleChunkLoadingPlugin.js +++ b/lib/esm/ModuleChunkLoadingPlugin.js @@ -8,6 +8,7 @@ const RuntimeGlobals = require("../RuntimeGlobals"); const ExportWebpackRequireRuntimeModule = require("./ExportWebpackRequireRuntimeModule"); const ModuleChunkLoadingRuntimeModule = require("./ModuleChunkLoadingRuntimeModule"); +const StartupChunkDependenciesPlugin = require("../runtime/StartupChunkDependenciesPlugin"); /** @typedef {import("../Compiler")} Compiler */ @@ -18,6 +19,10 @@ class ModuleChunkLoadingPlugin { * @returns {void} */ apply(compiler) { + new StartupChunkDependenciesPlugin({ + chunkLoading: "import", + asyncChunkLoading: true + }).apply(compiler); compiler.hooks.thisCompilation.tap( "ModuleChunkLoadingPlugin", compilation => {