Skip to content

Commit

Permalink
Merge pull request #24 from htulipe/js-lib-versions
Browse files Browse the repository at this point in the history
Support React v16 and fetch v3
  • Loading branch information
mcg-web authored Feb 3, 2020
2 parents ab18c41 + 600ef65 commit 3161762
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Resources/views/GraphiQL/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@
</style>
<link href="https://unpkg.com/graphiql@{{ versions.graphiql }}/graphiql.css" rel="stylesheet">
{% endblock style %}
<script src="https://unpkg.com/whatwg-fetch@{{ versions.fetch }}/fetch.js"></script>
<script src="https://unpkg.com/react@{{ versions.react }}/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom@{{ versions.react }}/dist/react-dom.min.js"></script>
{% if versions.fetch matches '/^[~^]?2/' %}
<script src="https://unpkg.com/whatwg-fetch@{{ versions.fetch }}/fetch.js"></script>
{% else %}
<script src="https://unpkg.com/whatwg-fetch@{{ versions.fetch }}/dist/fetch.umd.js"></script>
{% endif %}
{% if versions.react matches '/^[~^]?15/' %}
<script src="https://unpkg.com/react@{{ versions.react }}/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom@{{ versions.react }}/dist/react-dom.min.js"></script>
{% else %}
<script src="https://unpkg.com/react@{{ versions.react }}/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@{{ versions.react }}/umd/react-dom.production.min.js"></script>
{% endif %}
<script src="https://unpkg.com/graphiql@{{ versions.graphiql }}/graphiql.min.js"></script>
<title>{% block title %}GraphiQL{% endblock title %}</title>
{% endblock head %}
Expand Down

0 comments on commit 3161762

Please sign in to comment.