-
-
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
Extract Babel configuration to a separate package #674
Comments
I could look into this soon, but I wonder what we should call these packages? I'll throw in some random ideas:
|
Renaming this issue to be only about the Babel preset, because there was a separate issue about ESLint config: #655. |
I vote for (Though, in the future, I'd love to see official FB recommandations under |
@AlicanC There's already eslint-config-fbjs which is used at least in FBJS, and (with stricter extensions) in React and Jest. However it seems to me that an CRA's configuration (used for React apps) would have different goals than than the FBJS configuration (used for FB libraries). |
|
@fson Do you think you can take this? |
@gaearon Yeah, planning to tackle this today or tomorrow. Should be pretty straightforward now that presets can also accept options (we probably need this for different development/production configs). |
I think it might be reasonable to just use Babel env option and not use configuration. |
As a follow up we should make it so we have a |
Absolutely. I had this is mind when doing the split already, but didn't want to touch too many things at once. |
@fson FYI, I’m working on it already but happy to leave it to you to polish. |
Once the monorepo configuration in #419 has landed, we should move Babel configuration to a preset package and linting rules to an ESLint config package.
This will improve the ejected experience, because we will generate less configuration and also simplify some of the underlying code, which is getting quite complex because of the differences between running inside react-scripts and in the ejected mode (as can be seen in #602).
In the long term providing smaller configuration packages makes it easier to eject without opting in to maintain all the aspects of the config. This can also make forks that reuse the config easier to maintain.
The text was updated successfully, but these errors were encountered: