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

Calling `loadChunk` with the same params never resolves on the second invocation

Open tom-sherman opened this issue 2 years ago • 2 comments

I needed to patch this in order to get known remotes working and sync imports working.

Patch here:

https://github.com/tom-sherman/module-federation-repack/blob/466d5fddcb22391c380ebbe5b4583415c311721d/host/patches/%40callstack%2Brepack%2B2.5.1.patch

From what I could see when the runtime tries to reload the chunk (eg. on app reload) the loadChunk promise was never resolving - it got stuff waiting for the loaded event to be emitted - the loadChunkCallback function was never being called on the second run through.

I'm not sure if this patch treats a symptom, or if skipping the load callback in the ChunkManager is the right way to do it. @zamotany Please let me know your thoughts and I can upstream a PR to repack to fix this

tom-sherman avatar Jun 30 '22 10:06 tom-sherman

I'm currently working on Re.Pack 3 which solves almost all of the problems around MF. The progress can be tracked here: https://github.com/callstack/repack/projects/4

zamotany avatar Jun 30 '22 10:06 zamotany

@zamotany Can we know when Re.Pack 3 is planed for release

manojSadhu12 avatar Aug 07 '22 01:08 manojSadhu12