-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add support for babel-macros #1968
Comments
cc @josephsavona if you're still interested :-) |
I'm not very familiar with create-react-app, if someone want's to publicise something or work on a |
I don’t think this issue is about creating an example. It’s about supporting this: http://babeljs.io/blog/#zero-config-code-transformation-with-babel-macros |
That's correct. The idea is that hopefully if we get a |
Re-opening for now as there's clearly interest and potential value. Trying to understand what this would involve. We could move the babel transform into the
But we would still need to run the relay compiler to generate the files. I guess users of CRA could still install the |
I think that should work. I don't know relay very well though. How does it normally integrate with webpack projects? Do folks normally have two scripts running? One for webpack and the other for the relay-compiler? |
Yes or a build process that invokes both of them sequentially / in watch mode. |
That sounds reasonable to me! |
Hi there 👋
I'm helping to investigate ways that create-react-app can use babel plugins like babel-plugin-relay without having to change configuration (see facebook/create-react-app#2730 for more context). This has resulted in the creation of
babel-macros
. Withbabel-macros
, users can install and configure this plugin and have access to use anymacro
available (or create their own) without configuring anything else. This is appealing to create-react-app users because so far they've had to eject if they wanted to use something likepreval
,emotion
, or the babel plugin for relay.Adding support should be pretty simple (mostly a slight extracting refactor around here to allow code sharing between the plugin and macro) and starting out with experimental support would be totally fine considering we face a catch 22 situation (CRA wants to see usage of babel-macros in the community before adopting it and you all probably feel the same).
What do you all think?
The text was updated successfully, but these errors were encountered: