Skip to content

Commit 6efeaeb

Browse files
authored
Fix suppot for mui (#5016)
1 parent e5c64c5 commit 6efeaeb

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astrojs/react': minor
3+
---
4+
5+
Add support for mui
6+
7+
This adds support for [mui](https://mui.com/) through configuration. Users will now not need to configure this library to get it to work.

packages/integrations/react/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ function getViteConfiguration() {
6161
external: ReactVersion.startsWith('18.')
6262
? ['react-dom/server', 'react-dom/client']
6363
: ['react-dom/server.js', 'react-dom/client.js'],
64+
noExternal: [
65+
// These are all needed to get mui to work.
66+
'@mui/material', '@mui/base', '@babel/runtime'
67+
]
6468
},
6569
};
6670
}

0 commit comments

Comments
 (0)