fix: esm with splitChunks
parent
8ce07a13b7
commit
57cdb411b1
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue