You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 useESModules would really help me as I then can avoid forking babel-preset-react-app
I have the same use case as @Pajn, I am using the babel-preset-react-app as the babel config for helper libraries and my node servers. It used to work good before version 2.0. I have recently found another problem that is breaking:
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 babel-preset-recat-app package as a standalone babel preset. I have opened an issue with Babel about this, but they have not responded yet.
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.
Activity
Timer commentedon Oct 16, 2018
We can take this as an option. May I ask your use case?
Pajn commentedon Oct 19, 2018
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
useESModuleswould really help me as I then can avoid forking babel-preset-react-appivosabev commentedon Oct 20, 2018
I have the same use case as @Pajn, I am using the
babel-preset-react-appas the babel config for helper libraries and my node servers. It used to work good before version 2.0. I have recently found another problem that is breaking:https://github.com/facebook/create-react-app/blob/473fde0e1c5cca2c4c04f63b25348f6097ef4cc2/packages/babel-preset-react-app/create.js#L147
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
babel-preset-recat-apppackage as a standalone babel preset. I have opened an issue with Babel about this, but they have not responded yet.babel/babel#8799
bugzpodder commentedon Oct 20, 2018
@ivosabev you can disable runtime path: #5443 (comment)
stale commentedon Nov 19, 2018
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.
Timer commentedon Nov 19, 2018
PR up in #5487
strayiker commentedon Dec 5, 2018
Can this option be applied to the
envpreset?https://github.com/facebook/create-react-app/blob/013c8f2c733ef2022c138d69207297cc25a62d60/packages/babel-preset-react-app/create.js#L93-L94
This will allow us to transpile the whole CRA application code for ssr needs.
Also, it will be more obvious if
useEsModules: falsewill be guaranty that transpiled code does not contains esm statements.Timer commentedon Dec 6, 2018
I don't see why not, send a PR?