supnate / rekit

IDE and toolkit for building scalable web applications with React, Redux and React-router
http://rekit.js.org
MIT License
4.48k stars 258 forks source link

Different ways of CSS generation between 2.X and 3.X #210

Open danielo515 opened 4 years ago

danielo515 commented 4 years ago

Hello, Thanks for this amazing feature. I was in the middle of an app development when I realized there is a new version of rekit which has some important improvements, like using hooks and functional components. However, after porting some components the CSS rules are being applied differently (but I'm using the savme MUI version...)

Here is the old version: image

This is using v3:

image

One key part seems to be the injection order of the CSS rules. On the new version they are injected first, while on the old version they are injected last.

Any reason for this change? What can I do to fix it?

supnate commented 4 years ago

Actually I was not aware of this change. Maybe it's from the change of create react app template.

danielo515 commented 4 years ago

Yes, I thought that too. It can be the usage of webpack4 maybe... It is hard to determine, but is a real problem because you have to start using stuff like !important to beat the other rules.