-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
not compatible with prisma #79
Comments
Hi, thanks for reporting! |
After debugging for sometime, it seems that
I can provide the config and override it, and everything is ok. |
Nice finding!
Do you mean you edit your
Yes, we should. I just haven't been able to find a solution yet. I would appreciate for any help. |
Yes, I provide something like
in the vite config file.
I found vite will externalize all the dependencies by default in ssr mode, could we just use the default behavior? |
If you externalize a package, it won't be processed by vite and waku, which means we can't handle |
Oh I see, so the problem is we need to deal with third party dependencies which are most likely some react component libraries. Since there will be more dependencies to be externalized than not to be externalized, maybe we could make the default |
So, it's opt-in strategy instead of opt-out strategy as of now. I would like to see how other frameworks would go with this problem before deciding our strategy. |
@vincenteof Can you try #103 and see if it works? |
Sorry for the late response, since I have been busy these days. |
@vincenteof We haven't released a new version yet. pnpm i https://pkg.csb.dev/dai-shi/waku/commit/160238f1/waku |
I tried the codesandbox build version, and the resolution error disappears! |
Thanks. Yeah, #103 should solve all related issues. |
v0.14.0 is released. |
Trying to add prisma to an waku project, but seems that they are not compatible.
@prisma/client
doesn't have esm export. When the server component render, error shows:Cannot render RSC ReferenceError: module is not defined
Here is the repo link which reproduces the error.
I am not familiar with vite, but I have followed Server-Side Rendering section on vite official doc and add prisma to it, and this kind of error doesn't show, not sure it's a bug from vite or the waku behavior.
Here is the repo link in which prisma works with vite.
The text was updated successfully, but these errors were encountered: