-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MUI React Component Library / Fails in all modes #428
Comments
|
@Aslemammad any insight? |
I'll take a look at this! |
looks like commonjs plugin run twice? |
no improvement here with #457 |
taking a look on this. |
I'm getting a different error:
|
With the current main branch and the
This is the error - when using DEV MODE The error |
Yes, I'm trying to fix it! Hope I get the answer to the issue soon. |
Well, the dev issue is because emotion/mui are not supporting RSC properly. emotion-js/emotion#2928 Let me see the build error now. |
The reason for the build error, in many mui modules is that commonjs resolver in rollup seems to have an issue with
I could not find a solution, it'd be interesting to have this reproduced in a vite template without waku or any other module. I feel I put so much time on finding the answer, but could not, so it might be better to take a time off and put time on the other issues. |
So, is it MUI issue?
okay. |
Yes, that's how I see it. I might be wrong though. |
@aheissenberger Your thought? |
Currently busy with other projects but I will give it some time and check how it works outside Waku and with NextJS App folder. I won't start before mid of next week. |
What's the issue with Material UI? |
I will test it against the current version today and will report the progress. |
@oliviertassinari MUI 5.15.15 and 6.0.0-alpha.2 are not working with WAKU 0.20.1-alpha.0 in SSR mode. |
I mean, what's the root cause? Reading the thread, it seems to be about the way Material UI implements ESM/CJS dual mode support. |
Yes, a "modern" react library needs to provide code for three different environments during bundling:
Second, MUI and Mantine use a React Context for theming which is not supported on the backend. MUI provides a fix for this with a special RSC Cache for Next.js. Look at react-textarea-autosize library to see how they bundle and setup the package.json export section to support all modes. I know MUI 5.15 works with next.js 14 but many library do some kind of rsc/webpack detection which only works with next.js :-(. |
pnpm waku dev
orpnpm waku dev --with-ssr
- looks like a problem in ViteJS:Repo to reproduce error:
https://github.com/aheissenberger/waku-mui
Error:
ppm waku build
Error:
The text was updated successfully, but these errors were encountered: