-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Revert "Add loader for .graphql files (#3909)" #5076
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For brevity, the macro is https://github.com/evenchange4/graphql.macro Usage: import { loader } from 'graphql.macro';
const A = loader('./assets/graphql.graphql'); Thanks @Timer! |
Changes in a |
@glennreyes Please file a new issue. |
Initial loader support in CRA2 was reverted here: facebook/create-react-app#5076 Using the macro https://github.com/evenchange4/graphql.macro the same can be achieved.
This reverts adding explicit support for
.graphql
files following #4893.This behavior is easily accomplished via a babel macro, and it more explicit than getting an arbitrary-version AST object from a text file.