Skip to content
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

Use the prod distribution of React instead of dev in the CDN example #3402

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kiendang
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Aug 12, 2023

⚠️ No Changeset found

Latest commit: c495e8b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 12, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kiendang / name: Kien Dang (c495e8b)

@acao
Copy link
Member

acao commented Aug 12, 2023

we are already doing this in #3380

@acao
Copy link
Member

acao commented Aug 12, 2023

thanks, though!

@acao acao closed this Aug 12, 2023
@kiendang
Copy link
Contributor Author

Maybe I don't understand it fully, but that PR is for the graphiql-webpack example not the graphiql-cdn example no?

The reason for this PR is there are GraphQL frameworks out there like strawberry and graphene-django that serve GraphiQL and use the CDN example here as reference. Because of this sometimes they just copy paste and ended up shipping with react development which is 10 times the size of production.min.js. Example.

Maybe it's worth changing here too?

@tyranron
Copy link

tyranron commented Jan 31, 2024

@acao ping... I do agree with @kiendang here. Would you mind reconsidering this PR?

@acao
Copy link
Member

acao commented Feb 1, 2024

does https://graphiql-dev.netlify.app/webpack not work? what is the purpose in particular?

@tyranron
Copy link

tyranron commented Feb 1, 2024

@acao it seems to me that @kiendang stated the problem quite clear:

The reason for this PR is there are GraphQL frameworks out there like strawberry and graphene-django that serve GraphiQL and use the CDN example here as reference.

The choice of the graphiql-cdn example is obvious, because they do not want to bother with webpack and/or other toolchains just to serve the GraphiQL page. So, they mostly use it "as is", adjusting it only in few bits to work with the framework, but do not re-check optimality of the dependencies. And then things go viral, because every framework has its users.

Because of this sometimes they just copy paste and ended up shipping with react development which is 10 times the size of production.min.js.

@acao
Copy link
Member

acao commented Feb 1, 2024

oh this is for the cdn example! that makes sense

@acao acao reopened this Feb 1, 2024
@acao
Copy link
Member

acao commented Feb 1, 2024

really, we should be showing how to use <script type="module"> as modern browsers don't need UMD anymore but that's another matter

@kiendang
Copy link
Contributor Author

kiendang commented Feb 8, 2024

Thanks a lot @tyranron for the clarification 👍

@acao let me know if there's anything else needed to get this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants