0

SO i have an app, and it contains two micro apps, gated behind a login route. I want to use 2 different style sheets, for each of these apps. However, when react builds, it compiles them both into 1 chunk file, which over writes styles for 1 of the apps.

How can I achieve 2 separate style sheets, for 2 separate apps, using the same css syntax for both?

example:

app one has a .header-wrapper as a style in the css.

app 2 also has a .header-wrapper, and when react builds, one of them is going to get over-ridden.

How can i avoid this?

(i think im looking for a solution like locally scoped component styles similar to angular)

Josh Winters
  • 829
  • 5
  • 12
  • 27
  • Take a look here: https://stackoverflow.com/questions/47090574/how-to-make-react-css-import-component-scoped – Michele Jul 02 '19 at 12:48
  • have yoou tried `css-in-js` ? or `styled`? – Maielo Jul 02 '19 at 12:55
  • css modules is a good solution, i was hoping for a better one. from what I understand, using things like pseudo classes and hyphens inside the class name causes issues. – Josh Winters Jul 02 '19 at 13:14

0 Answers0