Skip to content
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

Fix support for mui #5016

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/friendly-bottles-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astrojs/react': minor
---

Add support for mui

This adds support for [mui](https://mui.com/) through configuration. Users will now not need to configure this library to get it to work.
4 changes: 4 additions & 0 deletions packages/integrations/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ function getViteConfiguration() {
external: ReactVersion.startsWith('18.')
? ['react-dom/server', 'react-dom/client']
: ['react-dom/server.js', 'react-dom/client.js'],
noExternal: [
// These are all needed to get mui to work.
'@mui/material', '@mui/base', '@babel/runtime'
]
},
};
}
Expand Down