DEV Community

Discussion on: Let's Build Micro Frontends with NextJS and Module Federation!

Collapse
 
hamatoyogi profile image
Yoav Ganbar

Hi Shun,
Delighted you liked the article :-)
I have actually not tried using CSS modules in this example, but I believe it would be possible to do so. I might be mistaken, but I think that if you do use them in a remote component the CSS would be bundled with the federated component.

Well... went on and tried just so I can see that I was right, and indeed it does work :-)

There's no need to retrieve any link or style tag - the federated code has it all.
You can check out this branch that shows it working.

Hope this helps!

Collapse
 
suhanw profile image
Suhan Wijaya

Thanks for your prompt response!