Skip to content

Commit d1e5ede

Browse files
Switch to using standalone builds (#309)
1 parent a55e30e commit d1e5ede

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ The signature of the `init` function:
5858
You can get GraphQL Voyager bundle from the following places:
5959

6060
- [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/graphql-voyager/badge)](https://www.jsdelivr.com/package/npm/graphql-voyager)
61-
- some exact version - https://cdn.jsdelivr.net/npm/graphql-voyager/v1.0.0-rc.15/voyager.min.js
62-
- latest version - https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.min.js
61+
- some exact version - https://cdn.jsdelivr.net/npm/graphql-voyager@1.2/dist/voyager.standalone.js
62+
- latest version - https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.standalone.js
6363
- from `dist` folder of the npm package `graphql-voyager`
6464

6565
**The HTML with minimal setup** (see the full [example](./example))
@@ -68,14 +68,11 @@ You can get GraphQL Voyager bundle from the following places:
6868
<!DOCTYPE html>
6969
<html>
7070
<head>
71-
<script src="https://cdn.jsdelivr.net/npm/react@16/umd/react.production.min.js"></script>
72-
<script src="https://cdn.jsdelivr.net/npm/react-dom@16/umd/react-dom.production.min.js"></script>
73-
7471
<link
7572
rel="stylesheet"
7673
href="https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.css"
7774
/>
78-
<script src="https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.min.js"></script>
75+
<script src="https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.standalone.js"></script>
7976
</head>
8077
<body>
8178
<div id="voyager">Loading...</div>

example/index.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313
}
1414
</style>
1515

16-
<!--
17-
GraphQL Voyager itself depends on React DOM.
18-
If you do not want to rely on a CDN, you can host these files locally or
19-
include them directly in your favored resource bundler.
20-
-->
21-
<script src="https://cdn.jsdelivr.net/npm/react@16/umd/react.production.min.js"></script>
22-
<script src="https://cdn.jsdelivr.net/npm/react-dom@16/umd/react-dom.production.min.js"></script>
23-
2416
<!--
2517
These two files are served from jsdelivr CDN, however you may wish to
2618
copy them directly into your environment, or perhaps include them in your
@@ -30,7 +22,7 @@
3022
rel="stylesheet"
3123
href="https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.css"
3224
/>
33-
<script src="https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.min.js"></script>
25+
<script src="https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.standalone.js"></script>
3426
</head>
3527
<body>
3628
<div id="voyager">Loading...</div>

src/middleware/render-voyager-page.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ export default function renderVoyagerPage(options: MiddlewareOptions) {
3131
<link rel="stylesheet"
3232
href="https://cdn.jsdelivr.net/npm/graphql-voyager@${version}/dist/voyager.css"
3333
/>
34-
<script src="https://cdn.jsdelivr.net/npm/react@16/umd/react.production.min.js"></script>
35-
<script src="https://cdn.jsdelivr.net/npm/react-dom@16/umd/react-dom.production.min.js"></script>
36-
<script src="https://cdn.jsdelivr.net/npm/graphql-voyager@${version}/dist/voyager.min.js"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/graphql-voyager@${version}/dist/voyager.standalone.js"></script>
3735
</head>
3836
<body>
3937
<main id="voyager">

0 commit comments

Comments
 (0)