aboutsummaryrefslogtreecommitdiff
path: root/playground/src/main.ts
diff options
context:
space:
mode:
authornetop://ウィビ <paul@webb.page>2026-04-24 16:50:12 -0700
committernetop://ウィビ <paul@webb.page>2026-04-24 16:50:12 -0700
commit216441d3564e00aabfac7e8acf346e34a5db9598 (patch)
tree67cfc8ccac0df117f098d8fa0569000ed8274a20 /playground/src/main.ts
parent85c05927989c712015ee82cea9b2917485a3f0e8 (diff)
downloadgraphiql-216441d3564e00aabfac7e8acf346e34a5db9598.tar.gz
graphiql-216441d3564e00aabfac7e8acf346e34a5db9598.zip
Add Vite playground for local development
npm run dev boots a Vite + Svelte 5 server at localhost:5173, importing GraphiQL.svelte directly from source/library. HMR reflects changes without a package rebuild. Points at the public Countries API by default — swap playground/src/App.svelte for your own endpoint.
Diffstat (limited to 'playground/src/main.ts')
-rw-r--r--playground/src/main.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/playground/src/main.ts b/playground/src/main.ts
new file mode 100644
index 0000000..bf39df9
--- /dev/null
+++ b/playground/src/main.ts
@@ -0,0 +1,9 @@
+import { mount } from "svelte";
+import App from "./App.svelte";
+
+const target = document.getElementById("app");
+
+if (!target)
+ throw new Error("missing #app target");
+
+mount(App, { target });