Fix suppot for mui (#5016)
This commit is contained in:
parent
e5c64c51c1
commit
6efeaeb39e
2 changed files with 11 additions and 0 deletions
7
.changeset/friendly-bottles-push.md
Normal file
7
.changeset/friendly-bottles-push.md
Normal 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.
|
|
@ -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'
|
||||
]
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue