-
-
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
How to add a babel plugin #2611
Comments
I looked at this issue: #1069 by gaearon where he basically says: |
How about without ejecting? |
There is no way to add a Babel plugin without ejecting. This helps us ensure that the setup works correctly and isn't suspecticle to very common configuration mistakes or inclusion of unmaitained plugins. What plugin did you want to add? |
Hmm, so there's no other option unless ejecting. |
If you consider syntactic sugar to be more important than being able to get updates to underlying tools, then sure, your best option would be to eject. I probably wouldn’t do it on my project even if I liked the syntax. I’m not aware of any news about this proposal going forward. Moving the repo could just be a logistical decision (worth checking if other proposals did the same). |
Just want to add my own |
I agree we need a better story around handling i18n. A dedicated issue would be better for this though. |
+1 to the internationalization issue. I really want to eject just to get https://github.com/akameco/babel-plugin-react-intl-auto and https://github.com/akameco/extract-react-intl-messages working :/ |
So how can I add https://github.com/davidhu2000/react-spinners which MUST use the https://github.com/emotion-js/emotion babel plugin? |
@stoyandamov I ended up using this: https://github.com/timarney/react-app-rewired |
We wanted to use the babel plugin provided by styled-components which adds support for server-side rendering, minification of styles and gives a nicer debugging experience while using styled-components with react. It would be great if we could add plugins by extending the babel config that CRA is currently using internally without ejecting. I guess the api could allow adding something like this in
|
You can accomplish this with Babel Macros support coming out in |
Sorry for my ignorance, but after ejecting I can't seem to figure out how to add a plugin,
I'm used to the simplicity of .babelrc but it seems to not work with create-react-app
Thanks.
When I add .babelrc I get the following error:
The text was updated successfully, but these errors were encountered: