module-federation-examples icon indicating copy to clipboard operation
module-federation-examples copied to clipboard

Webpack Module Federation Circular Dependency Causes .get() to Remain Pending

Open 21duxue opened this issue 2 weeks ago • 0 comments

In the webpack module federation, there is a circular dependency between two remote modules, which causes the.get() function to remain in pending. Besides having the user break the circular dependency, are there any other solutions? Seeking guidance!!

In everyone's code, it was directly imported and used. Eventually, it was replaced by the webpack plugin with the "promise new promise" method

A->B B->A

window.A.get() => pendding

window.B.get() => pendding

21duxue avatar Dec 03 '25 02:12 21duxue