CSS Overriding Issue When Using Tailwindcss with React and Vite #261
-
Hi I am running into a problem in which my MFEs are using Tailwind, React and Vite. When I am putting all of this together in my core project which also has its CSS for the layout purposes, the styles of the respective MFE is overriding and it is losing its styling. Can you please guide me in this regard that where we are doing something wrong? Thanks! Warm Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What's the definition of "core project"? In single-spa, we have root projects and MFE projects. Is "core project" == "root project"? Generally speaking, you need to make sure that your classes are scoped. React has no CSS scoping solution out of the box, so you'll have to look for a solution, for which I'm sure there are several. Scoped CSS will only affect the user interface for the project it comes from. |
Beta Was this translation helpful? Give feedback.
What's the definition of "core project"? In single-spa, we have root projects and MFE projects. Is "core project" == "root project"?
Generally speaking, you need to make sure that your classes are scoped. React has no CSS scoping solution out of the box, so you'll have to look for a solution, for which I'm sure there are several. Scoped CSS will only affect the user interface for the project it comes from.