You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, trying it as described does not change the bundle size. Reading the source code, I found an option called gqlTagName, which could be minified by specifying it to "graphql".
What I find odd here is that the client-preset default specifies "graphql", but the babelPlugin default is "gql" .
Since the situation currently does not work properly even if we proceed as documented, it would be better to match the default values to one of them.
I would prefer to change the babelPlugin to "graphql" and can submit a pull request if you like.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am now trying to use client-preset.
background
I was looking at this document to try to use of babelPlugin.
https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size-babel-plugin
However, trying it as described does not change the bundle size. Reading the source code, I found an option called gqlTagName, which could be minified by specifying it to
"graphql".What I find odd here is that the client-preset default specifies
"graphql", but the babelPlugin default is"gql".graphql-code-generator/packages/presets/client/src/index.ts
Line 216 in 24d91bb
graphql-code-generator/packages/presets/client/src/babel.ts
Line 16 in 24d91bb
Description
Since the situation currently does not work properly even if we proceed as documented, it would be better to match the default values to one of them.
I would prefer to change the babelPlugin to
"graphql"and can submit a pull request if you like.I have the tried source code and the commit that confirmed the bundle size reduction. You can check this if you like.
MH4GF/graphql-codegen-client-preset-example@5fa53dd
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions