Integrate MUI to Remix 2.8 + Vite basic template #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
It is a clean integration of Remix 2.0 + Vite and MUI 5.14. It helps you to quickly integrate and use MUI inside your own Remix projects.
Why?
The current original materila-ui-remix example is outdated and really hard to integrate with Remix changes. It has done alot for
emotion
integration but it is not clear if we still need them or not (seems not). We need an alternative to help devs quickly integrate MUI to their own app.How?
it is based on basic Remix template, i.e.
npx create-remix@latest
which is based on Vite. Keeping the baic template should help you quickly find changes and move them to your own project. The "Files Changed" section in this PR shows the required changes you need to do to bring MUI to your own project.Notes:
import {Favorite as FavoriteIcon} from @mui/icons-material
instead ofimport FavoriteIcon from "@mui/icons-material/Favorite";
import { colors } from "@mui/material" instead of
import { red } from '@mui/material/colors';`mui
folder and kept the main remix file changes minmal. so, we are able to adopt to new changes quickly.mui.tsx
is an example to test.npm run dev
andnpm run build
+npm run start
Next?
We still need a thourough review for original contibuters to make sure this approach doesn't change anything wrongly. If everything is fine, we should be ok to alter the original MUI example with this approach.