Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is remoteEntry.js created in module federation/micro frontend?

I'm reading up on module federation/ MFE and it all seems to make sense besides the remoteEntry.js file.

So if I understand this correctly, my MFE:

  • Creates a remoteEntry.js file which my host then looks for and that is how the code is integrated to my host app? Basically all my MFE code is complied into this js file?
  • How is remoteEntry.js created? I can't see it in my MFE's file directory.
  • Do I need to 'rebuild' my MFE every time I want to make a change and see it on my host app?
like image 366
newcoder00 Avatar asked Nov 30 '25 16:11

newcoder00


1 Answers

Answering your questions, yes everything is compiled in to the remoteEntry.js and then you load that into another frontend (shell, or parent). Usually this file gets created by your compiler (webpack + babel). For development you will usually have a hot reload for webpack and that will basically regenerate your build during dev.

like image 128
Hector Ramirez Avatar answered Dec 03 '25 15:12

Hector Ramirez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!