-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Ability to set useESModules
to false
#5452
Comments
We can take this as an option. May I ask your use case? |
I just hit on the same problem. My use case is that I use a combined build process for everything for which babel-preset-react-app is the base but with additional plugins for things in the node environment. This has worked good previously but when I try to update to the new version I of course get syntax errors on the import syntax. Being able to disable |
I have the same use case as @Pajn, I am using the
When I build my node server it includes absolute paths, which it shouldn't and there is no way to stop this. I think the best solution would be if we can overwrite those settings, when using the |
@ivosabev you can disable runtime path: #5443 (comment) |
This issue 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. |
PR up in #5487 |
Can this option be applied to the create-react-app/packages/babel-preset-react-app/create.js Lines 93 to 94 in 013c8f2
This will allow us to transpile the whole CRA application code for ssr needs. Also, it will be more obvious if useEsModules: false will be guaranty that transpiled code does not contains esm statements.
|
I don't see why not, send a PR? |
It seems to me that there is no way in which this settings can be set to false? It could not be overwritten in a
babel.config.js
neither 😞create-react-app/packages/babel-preset-react-app/create.js
Line 143 in f89385f
The text was updated successfully, but these errors were encountered: