-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Material UI styles broken in production build #3173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ah, this is no good! Could you please try to figure out what's causing this and put together a pull request to fix this behavior? A reproducible demo would be useful, too. |
I will continue debugging this. In the meantime, here's a reduced test case: https://github.com/tlvince/tlvince-reduced-test-case-material-ui-cra |
Ah, this appears to be a manifestation of mui/material-ui#8223; see my update here mui/material-ui#8223 (comment). Feel free to close this issue. |
@tlvince I have run into the same problem and wonder have you solved it ?? |
@dqhuy78 please file a new issue. |
same here |
The same problem. Haven't you already solved this issue? |
same here! |
I ended up to remove |
Going to lock because I saw no evidence this is related to Create React App. |
Is this a bug report?
No(?)
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
Environment
node -v
: v6.11.3npm -v
: 5.4.2npm ls react-scripts
: 1.0.7Then, specify:
Steps to Reproduce
npm run build
Expected Behavior
Styles (of the included component) to match what they look like in development (
npm start
):Actual Behavior
Styles are mangled/page layout broken:
Reproducible Demo
https://github.com/tlvince/tlvince-reduced-test-case-material-ui-cra
The issue can be worked around by including the component under
src
(rather than withinnode_modules
). It appears that something in CRA's production build is breaking the layout/mangling the styles.The text was updated successfully, but these errors were encountered: