Tailwind classes not work in mfe remote module #13446
-
What version of Tailwind CSS are you using? 3.3.3 What build tool (or framework if it abstracts the build tool) are you using? nx 18.0.0 What version of Node.js are you using? v18.16.0 What browser are you using? Chrome latest What operating system are you using? macOS Describe your issue My front-end architecture is a host application and multiple remote modules, and the language is angular. Managed via nx mfe. Both the main application and the remote module use tailwindcss. The current problem is that the tailwindcss classes style does not take effect after the remote module is loaded through the main application. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! Tailwind CSS works at build time, there is no runtime involved. If you load modules from some remote location at runtime then Tailwind will not be able to pick this up. If you want, you can use the Can you share a minimal reproduction repo to further investigate? |
Beta Was this translation helpful? Give feedback.
Hey!
Tailwind CSS works at build time, there is no runtime involved. If you load modules from some remote location at runtime then Tailwind will not be able to pick this up.
If you want, you can use the
safelist
feature (https://tailwindcss.com/docs/content-configuration#safelisting-classes) but that's not ideal.Can you share a minimal reproduction repo to further investigate?