Open lnlfps opened 2 days ago
When working with umijs or father, during the compilation of less modules, some 'build time chunks' are generated. These temporary chunks lack chunkGraph information, leading to errors when generating runtime code.
// enhanced/scr/lib/container/runtime/FederationRuntime.ts 49 const conditionMap = this.compilation.chunkGraph.getChunkConditionMap( this.chunk, chunkHasJs, );
Then The current chunk id is build time chunk, the variable this.compilation.chunkGraph is undefined,causing an exception to be thrown
build time chunk
this.compilation.chunkGraph
undefined
Suggestion
If the chunk's id is build time chunk, do not inject the federation runtime to this chunk. like this:
-
npm
Send a pull request
Describe the bug
When working with umijs or father, during the compilation of less modules, some 'build time chunks' are generated. These temporary chunks lack chunkGraph information, leading to errors when generating runtime code.
Then The current chunk id is
build time chunk
, the variablethis.compilation.chunkGraph
isundefined
,causing an exception to be thrownSuggestion
If the chunk's id is
build time chunk
, do not inject the federation runtime to this chunk. like this:Reproduction
-
Used Package Manager
npm
System Info
Validations