Skip to content

Commit

Permalink
Fix suppot for mui (#5016)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored Oct 7, 2022
1 parent e5c64c5 commit 6efeaeb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
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

0 comments on commit 6efeaeb

Please sign in to comment.