Open onozaty opened 4 weeks ago
Same here.
v6.0.2 works like v5 without any vite.config.ts
updates.
My workaround (only works for v6.1.2, not for v6.1.1) is to update vite.config.ts
as below:
ssr: {
noExternal: [process.env.NODE_ENV === 'development' ? '@mui/icons-material' : /^@mui\//],
},
In my case, remix vite:dev
needs @mui/icons-material
, and remix vite:build
needs /^@mui\//
. 🤯
Steps to reproduce
Execute the following repository,
Steps:
npm run dev
Current behavior
The following will appear in your browser's console
Expected behavior
Expect no errors in the browser console.
Context
This did not occur with Material UI v5. The code for v5 is as follows.
When I upgraded from Material UI v5 to v6, I initially got the following error with
npm run dev
.To avoid this, the following settings are added in
vite.config.ts
.Now the screen itself can be displayed, but there is an error in the browser console.
Your environment
``` System: OS: Linux 5.15 Debian GNU/Linux 12 (bookworm) 12 (bookworm) Binaries: Node: 20.15.1 - /usr/local/bin/node npm: 10.7.0 - /usr/local/bin/npm pnpm: Not Found Browsers: Chrome: Not Found npmPackages: @emotion/react: ^11.13.3 => 11.13.3 @emotion/styled: ^11.13.0 => 11.13.0 @mui/core-downloads-tracker: 6.1.2 @mui/icons-material: ^6.1.2 => 6.1.2 @mui/material: ^6.1.2 => 6.1.2 @mui/private-theming: 6.1.2 @mui/styled-engine: 6.1.2 @mui/system: 6.1.2 @mui/types: 7.2.17 @mui/utils: 6.1.2 @types/react: ^18.2.20 => 18.3.3 react: ^18.3.1 => 18.3.1 react-dom: ^18.3.1 => 18.3.1 typescript: ^5.1.6 => 5.5.3 ```npx @mui/envinfo
Search keywords: Remix Vite