module-federation / core

Module Federation is a concept that allows developers to share code and resources across multiple JavaScript applications
https://module-federation.io/
MIT License
1.27k stars 182 forks source link

Duplicate network request for chunk from multiple entryfiles #2644

Closed satheesh66 closed 1 day ago

satheesh66 commented 1 week ago

Thanks for the fix https://github.com/module-federation/core/issues/2569 @zhoushaw @2heal1.

But the issue is not fully resolved still I am facing a duplicate request issue even after updating @module-federation/enhanced@0.1.19

image image image

In the above screenshots, you can see the same chunk requested by multiple times (check the initiator chain in those requests)

the first request from the initial host's entry.js file and further requests from other services entry.js they have also used that chunk.

let me know if miss any thing! Thanks

@ScriptedAlchemy @2heal1 @zhoushaw

Originally posted by @satheesh66 in https://github.com/module-federation/core/issues/2569#issuecomment-2162254258

ScriptedAlchemy commented 1 week ago

Do you have a repo we can debug?

Are you using the runtime directly or using the federation plugin.

Need to know use and consumption

github-actions[bot] commented 1 week ago

Hello @satheesh66. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 5 days.

satheesh66 commented 1 week ago

Do you have a repo we can debug?

Are you using the runtime directly or using the federation plugin.

Need to know use and consumption

We are using hybrid mode some services are loaded from build time and some services are loaded from runtime. this is our prod setup I can't recreate this issue in a small setup, will try to add minimal reproduction code.

@ScriptedAlchemy

satheesh66 commented 6 days ago

The total number of network requests is 220 while loading the home page with module federation V1 but in V2 the requests number goes to 370, we don't know the root cause and I can't reproduce this issue in the small snippet everything works in the small setup but not in our product code.

let me know how can I debug and recreate this issue.

I have tried to recreate the issue with this code https://github.com/satheesh66/module-federation-v2 but I can't.

@ScriptedAlchemy @zhoushaw

github-actions[bot] commented 1 day ago

As the issue was labelled with need reproduction, but no response in 5 days. This issue will be closed. Feel free to comment and reopen it if you have any further questions. For background, see Why reproductions are required.

由于该 issue 被标记为 "需要重现",但在 5 天内没有回应,因此该 issue 将被关闭。如果你有任何进一步的问题,请随时发表评论并重新打开该 issue。背景请参考 为什么需要最小重现