Graphiql: Broken minified build for graphiql 0.16.0

Created on 8 Oct 2019  Â·  8Comments  Â·  Source: graphql/graphiql

Hi All,

The jsDelivr CDN distribution of GraphiQL seems broken at the moment.

I followed the official example at https://github.com/graphql/graphiql/blob/master/packages/examples/graphiql-cdn/index.html, and then changed the CDN URL from ./graphiql.js to https://cdn.jsdelivr.net/npm/graphiql/graphiql.min.js, which results in Minified React error #130.

Changing it to the full version ( https://cdn.jsdelivr.net/npm/graphiql/graphiql.js) seems to fix it.

Not sure if this issue belongs here, just something to note.
Thanks!

All 8 comments

@dinvlad thanks for reporting this, i’ll take a look, the latest release builds with typescript so its a big factor here

@acao Maybe this line needs to be changed to:

+ browserify -g browserify-shim -t uglifyify -s GraphiQL graphiql.min.js | uglifyjs -c > graphiql.min.js
- browserify -g browserify-shim -t uglifyify -s GraphiQL graphiql.js | uglifyjs -c > graphiql.min.js

if the intention is to use the file that was just built in the previous line to create the minified version?

Created a PR to address this issue. @acao

I can’t figure out how to stay logged in to github on my iphone for some
reason, hope to check this out soon

On Fri, Oct 18, 2019 at 6:25 PM Samuel notifications@github.com wrote:

Created a PR to address this issue. @acao https://github.com/acao

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/graphql/graphiql/issues/976?email_source=notifications&email_token=AAKOFF3A523ANBOMC5JI3CDQPIZURA5CNFSM4I6K5H7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBWH4UQ#issuecomment-543981138,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKOFFZU4DNXXCRTSI4RBQLQPIZURANCNFSM4I6K5H7A
.

@imolorhe apologies, did not mean to close this issue!

we will track this known bug here.

fix is a few PRs away.

unfortunately we won't have anyone to review PRs this weekend or for a while, so despite having a working minified bundle demo minified bundle it may still be a few weeks until a maintainer has the time to review this. But hey once it's released it'll be less than 1/4 of the original bundle size!

i spent a few nights just trying to get the legacy browserify build to work, but for whatever reason I couldn't, so the only option was the full path forward with webpack (I had spiked with Rollup previously some months ago, and I just couldnt get the legacy umd global interface working right). Webpack is the most versatile tool for the job IMO.

I originally introduced it as a mega-PR but then tried to slice it into smaller chunks, so i broke the PR up into several. It wasn't possible to break them down much further and still having building PRs. This is just unfortunately a chokepoint, given the complexity, so any peer review folks want to help with would be excellent and much appreciated, and would help my co-maintainers be able to review much more quickly.

Sounds good, thanks for working on this!!

https://unpkg.com/browse/[email protected]/graphiql.min.js

0.17.0 minified build is now available. generated using webpack. re-creating it requires two pending and already well reviewed PRs to be merged, but it's been thoroughly tested on chrome, firefox, safari.

an alpha probably would have been a better choice but some would argue 0.x.y versions are _always_ prerelease.

either way, there you have it! please let me know if there are any regressions. i have not tested this new webpack generated minified build in IE11 yet, which is another issue. we are adding new maintainers now so we should be able to start getting more things merged.

also noting that 0.14.2 min.js was 1.15mb, and it's now 744kb, so my math was wrong, but still a significant improvement! haha

Was this page helpful?
0 / 5 - 0 ratings