Fix suppot for mui (#5016)

This commit is contained in:
Matthew Phillips 2022-10-07 15:54:25 -04:00 committed by GitHub
parent e5c64c51c1
commit 6efeaeb39e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -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.

View file

@ -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'
]
},
};
}