|
42 | 42 | { |
43 | 43 | "imports": { |
44 | 44 | "react": "https://esm.sh/react@19.1.0", |
45 | | - "react/jsx-runtime": "https://esm.sh/react@19.1.0/jsx-runtime", |
| 45 | + "react/": "https://esm.sh/react@19.1.0/", |
46 | 46 |
|
47 | 47 | "react-dom": "https://esm.sh/react-dom@19.1.0", |
48 | | - "react-dom/client": "https://esm.sh/react-dom@19.1.0/client", |
49 | | - "@emotion/is-prop-valid": "data:text/javascript,", |
| 48 | + "react-dom/": "https://esm.sh/react-dom@19.1.0/", |
50 | 49 |
|
51 | 50 | "graphiql": "https://esm.sh/graphiql?standalone&external=react,react-dom,@graphiql/react,graphql", |
| 51 | + "graphiql/": "https://esm.sh/graphiql/", |
52 | 52 | "@graphiql/plugin-explorer": "https://esm.sh/@graphiql/plugin-explorer?standalone&external=react,@graphiql/react,graphql", |
53 | | - "@graphiql/react": "https://esm.sh/@graphiql/react?standalone&external=react,react-dom,graphql,@emotion/is-prop-valid", |
| 53 | + "@graphiql/react": "https://esm.sh/@graphiql/react?standalone&external=react,react-dom,graphql,@graphiql/toolkit,@emotion/is-prop-valid", |
54 | 54 |
|
55 | 55 | "@graphiql/toolkit": "https://esm.sh/@graphiql/toolkit?standalone&external=graphql", |
56 | | - "graphql": "https://esm.sh/graphql@16.11.0" |
| 56 | + "graphql": "https://esm.sh/graphql@16.11.0", |
| 57 | + "@emotion/is-prop-valid": "data:text/javascript," |
57 | 58 | } |
58 | 59 | } |
59 | 60 | </script> |
|
63 | 64 | import { GraphiQL, HISTORY_PLUGIN } from 'graphiql'; |
64 | 65 | import { createGraphiQLFetcher } from '@graphiql/toolkit'; |
65 | 66 | import { explorerPlugin } from '@graphiql/plugin-explorer'; |
66 | | - |
67 | | - import createJSONWorker from 'https://esm.sh/monaco-editor/esm/vs/language/json/json.worker.js?worker'; |
68 | | - import createGraphQLWorker from 'https://esm.sh/monaco-graphql/esm/graphql.worker.js?worker'; |
69 | | - import createEditorWorker from 'https://esm.sh/monaco-editor/esm/vs/editor/editor.worker.js?worker'; |
70 | | - |
71 | | - globalThis.MonacoEnvironment = { |
72 | | - getWorker(_workerId, label) { |
73 | | - console.info('MonacoEnvironment.getWorker', { label }); |
74 | | - switch (label) { |
75 | | - case 'json': |
76 | | - return createJSONWorker(); |
77 | | - case 'graphql': |
78 | | - return createGraphQLWorker(); |
79 | | - } |
80 | | - return createEditorWorker(); |
81 | | - }, |
82 | | - }; |
| 67 | + import 'graphiql/setup-workers/esm.sh'; |
83 | 68 |
|
84 | 69 | const fetcher = createGraphiQLFetcher({ |
85 | 70 | url: 'https://countries.trevorblades.com', |
|
0 commit comments