Material-UI production build generate different styles order definition than in development

Viewed 769

Using material-ui, the production build differs from the development one: the generated material-ui styles in production are not defined in the same order as ones from development one.

In DEV, the HTML head tag contains the material-ui styles in this order:

  • MuiPaper
  • MuiTouchRipple
  • MuiButtonBase
  • MuiButton
  • [...]

In PROD, the HTML head tag contains the material-ui styles in this order:

  • MuiButton
  • MuiButtonBase
  • MuiIcon
  • MuiMenu
  • [...]

So in production, it breaks styles: material-ui own styles are overriding one another...

Some more context:

My question: how can I make sure material-ui styles are rendered the same way in development and in production ?

1 Answers
Related