Use production distribution of React in GraphiQL (#1243)

This commit is contained in:
Kien Dang 2024-01-31 21:03:16 +08:00 committed by GitHub
parent f363b0d79e
commit d6297f493a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -39,6 +39,10 @@ graphiql:
https://raw.githubusercontent.com/graphql/graphiql/graphiql%40$(GRAPHIQL_VER)/examples/graphiql-cdn/index.html
$(sed-i) 's|unpkg.com/graphiql/|unpkg.com/graphiql@$(GRAPHIQL_VER)/|g' \
src/http/graphiql.html
$(sed-i) 's|react.development.js|react.production.min.js|g' \
src/http/graphiql.html
$(sed-i) 's|react-dom.development.js|react-dom.production.min.js|g' \
src/http/graphiql.html
$(sed-i) "s|'https://swapi-graphql.netlify.app/.netlify/functions/index'|JUNIPER_URL|g" \
src/http/graphiql.html
$(sed-i) "s|url: JUNIPER_URL,|url: JUNIPER_URL,\n subscriptionUrl: normalizeSubscriptionEndpoint(JUNIPER_URL, JUNIPER_SUBSCRIPTIONS_URL)|" \

View file

@ -30,11 +30,11 @@
-->
<script
crossorigin
src="https://unpkg.com/react@18/umd/react.development.js"
src="https://unpkg.com/react@18/umd/react.production.min.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"
src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"
></script>
<!--
These two files can be found in the npm module, however you may wish to