This is a pretty hard question to explain. I am using a fairly basic webpack react + redux + router setup. Within that setup I only use material-ui@1.0.0-beta.43 as user interface package. On the side there is also some additional scss styling. All packages are up to date.
In a development environment this all works as expected. However when it is compiled with NODE_ENV set to production
the styling becomes really weird. I have checked the webpack config difference between production and development, but that did not solve anything. So somewhere in a package the environment somehow seems to break things.
Production environment using
import { Grid } from 'material-ui'
in the root
Production environment using
import Grid from 'material-ui/es/Grid/Grid'
in the root
I honestly have no clue any more why it acts this way. In another project I have material-ui@1.0.0-beta.22 in production with react-create-app as base, which works all fine. Using beta 22 does also not solve the problem. Neither does downgrading to webpack 3 as used in react-create-app. I cannot seem to find any major differences which could lead to this result.
Would really appreciate if someone could shed some light on possible solutions.