I´m building my first GraphQL and Relay project using a GraphQL server, a create-react-app client and following the instructions on babel-plugin-relay to make my code recognize the graphql syntax graphql.
After setting up the whole environment, I´ve build the GraphQL server. All fine and working.
When I moved to client, I simply could not use babel-plugin-relay as instructed in the official documentation. After hours trying to solve I found out that the babel-plugin-relay can only be added to create-react-app if we eject the project.
Both create-react-app and babel-plugin-relay were born at Facebook, as well as Relay, and I see no reason why create-react-app does not support babel-plugin-relay without ejecting. Seens to be a couple of lines addition to current create-react-app babel configuration version, so:
a) Is is planned a version of create-react-app that will support the babel-plugin-relay required for Relay Modern ?
b) Considering the current situation, what is the best approach to include babel-plugin-relay to create-react-app without ejecting ?
I´m building my first GraphQL and Relay project using a GraphQL server, a
create-react-appclient and following the instructions onbabel-plugin-relayto make my code recognize the graphql syntaxgraphql.After setting up the whole environment, I´ve build the GraphQL server. All fine and working.
When I moved to client, I simply could not use
babel-plugin-relayas instructed in the official documentation. After hours trying to solve I found out that thebabel-plugin-relaycan only be added tocreate-react-appif we eject the project.Both
create-react-appandbabel-plugin-relaywere born at Facebook, as well as Relay, and I see no reason whycreate-react-appdoes not supportbabel-plugin-relaywithout ejecting. Seens to be a couple of lines addition to currentcreate-react-appbabel configuration version, so:a) Is is planned a version of
create-react-appthat will support thebabel-plugin-relayrequired for Relay Modern ?b) Considering the current situation, what is the best approach to include
babel-plugin-relaytocreate-react-appwithout ejecting ?