From 6b6621db889523610dc413f9521dea3dd908af58 Mon Sep 17 00:00:00 2001 From: lnlfps Date: Thu, 14 Nov 2024 20:21:50 +0800 Subject: [PATCH] fix(enhanced): should not inject runtime into the 'build time chunk' --- .../src/lib/container/runtime/FederationRuntimePlugin.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts b/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts index a37e694568..6e999c9f02 100644 --- a/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts +++ b/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts @@ -310,6 +310,9 @@ class FederationRuntimePlugin { this.constructor.name, (compilation: Compilation) => { const handler = (chunk: Chunk, runtimeRequirements: Set) => { + if (chunk.id === 'build time chunk') { + return; + } if (runtimeRequirements.has(federationGlobal)) return; runtimeRequirements.add(federationGlobal); runtimeRequirements.add(RuntimeGlobals.interceptModuleExecution);