MUI styles not loaded in production build #13627
Unanswered
kadosh1000
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure if this is the place to post it, but looking for a solution for over a day, couldn't find anything that will help.
We just started building an app using the
create-react-app
using TypeScript, and also using the@mui/material
for our components. Everything works great on dev (react-scripts start
) but once we build the production bundle all styles are not being included.We are using
@mui/material
createTheme to setup the theme and then include it in our index.tsx:Current behavior
Everything works great on dev (
react-scripts start
) but once we build the production bundle (react-scripts build
) all styles are not being included and there are no errors in the console.Here are screenshots from both:
Dev:
Production:
Any idea what should I do to have the styles also in the production build?
Beta Was this translation helpful? Give feedback.
All reactions