-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Fix babel preset useESModules option #6249
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
Conversation
Currently, `useESModules` only affects `@babel/plugin-transform-runtime` (so the compiled code not reference ESM versions of `@babel/runtime`). This is somewhat misleading, since the resulting code will still contain ES Module syntax if the source uses it. With this update, `useESModule: false` really means that the resulting code will not contain ES Module syntax.
Duplicates #5973 |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
update from master
Not sure why the build is failing, it doesn't really seem related to the changes I made:
|
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
I'd still like to see if this could be reviewed |
Can you elaborate more on this change? What does it improve or fix? |
If you use |
Oh wow I just noticed this is still around - um, does anyone know if this is still relevant? I haven't used CRA in a little while. cc @ianschmitz @bugzpodder just because you've looked at this in the past |
I'm gonna go ahead and close this because I simply don't remember the context well enough to resolve the conflicts. Sorry for all the going in circles here! |
Currently,
useESModules
only affects@babel/plugin-transform-runtime
(so the compiled code does not reference ESM versions of@babel/runtime
). This is somewhat misleading, since the resulting code will still contain ES Module syntax if the source uses it.With this update,
useESModule: false
really means that the resulting code will not contain ES Module syntax.I tested this locally in my company's fork of create-react-app.