-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
fix: handle using compiler with React 18 #330
Conversation
I'm surprised |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised
vite build
just let therequire
from a local package withouttype: module
pass though like this, feel like a bug in Vite.
I just ran locally and I get what you mean. I think I've seen something similar when my transform plugin accidentally injected export ...
into react cjs package which had require
. (I actually I wasn't sure at that time, but now seeing this issue, I'm guessing that was the case.)
Not sure why React team wrote that, but I think we can simply pick esm or cjs? I'll comment what I tested locally.
playground/compiler-react-18/lib/react-compiler-runtime/index.js
Outdated
Show resolved
Hide resolved
yeah either works, the gist is just a reference |
Any updates? |
@poteto yeah I know but default matters and I think that 9 years after ESM being spec, using them for client code will be better than an import style that never worked in browsers. |
Fix #328