From 6efeaeb39ed7e6642b31603745750ccb9fe0ff1e Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 7 Oct 2022 15:54:25 -0400 Subject: [PATCH] Fix suppot for mui (#5016) --- .changeset/friendly-bottles-push.md | 7 +++++++ packages/integrations/react/src/index.ts | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/friendly-bottles-push.md diff --git a/.changeset/friendly-bottles-push.md b/.changeset/friendly-bottles-push.md new file mode 100644 index 000000000000..73c6773115cf --- /dev/null +++ b/.changeset/friendly-bottles-push.md @@ -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. diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index 37cfb1b6ab14..b90819f4123b 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -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' + ] }, }; }