-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
Describe the bug
GraphQL queries stored inside template literals are not minified on production bundles.
Did you try recovering your dependencies?
(Write your answer here.) Yes
Which terms did you search for in User Guide?
(Write your answer here if relevant.) GraphQL minify
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from /Users/federicozivolo/.npm/_npx/30237/lib/node_modules/create-react-app
System:
OS: macOS 11.2.1
CPU: (4) x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
Binaries:
Node: 12.20.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Browsers:
Chrome: 88.0.4324.192
Edge: 87.0.664.47
Firefox: 84.0.2
Safari: 14.0.3
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
- Add a gql query to your code
- Compile
- Look at the bundle
Expected behavior
(Write what you thought would happen.)
The GraphQL queries should be minified, the newlines can all be removed.
Actual behavior
(Write what happened. Please add screenshots!)
The queries are left intact.
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)