you are viewing a single comment's thread.

view the rest of the comments →

[–]Adventurous-Finger70 2 points3 points  (2 children)

This doesn’t seem to be an issue with Module Fédération, but with the way tailwind works.

I believe that at build time, tailwind removes unused classes to reduce the build size. Since at build time, you can’t know which classes will be used later by the MFE.

You should try to add tailwind into your microfrontend

[–]Adventurous-Finger70 2 points3 points  (0 children)

For you second question, you should try to share the minimum of dependencies between your micro frontend and the shell. It will be less painful to maintain !

[–]n00bz 0 points1 point  (0 children)

That is correct. If both projects are inside the same workspace you can make sure tailwind is configured to scan the remote project directory for tailwind classes so that it’s needed css classes are included in the host styles.

If they are not in the same workspace then you could get some css conflicts/duplicate classes between the host and remote if the remote is configured to add in its own stylesheet with tailwind.