From 889b37b7e69066338cb2656d5031116ee7a299df Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 26 Feb 2024 11:08:52 +0100 Subject: [PATCH] chore: use seperate playground index --- playground/_index.html.ts | 91 +++++++++++++++++++++++++++++++++++++++ playground/_shared.ts | 4 +- 2 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 playground/_index.html.ts diff --git a/playground/_index.html.ts b/playground/_index.html.ts new file mode 100644 index 0000000..79dee98 --- /dev/null +++ b/playground/_index.html.ts @@ -0,0 +1,91 @@ +export default /* html */ ` + + + CrossWS Test Page + + + + +

WebSocket Test Page

+ +
+ + + +
+ +
+
+
+ +
+
+ +
+
+
+
+ +

+
+    
+  
+
+`;
diff --git a/playground/_shared.ts b/playground/_shared.ts
index 00c9a07..7b1d629 100644
--- a/playground/_shared.ts
+++ b/playground/_shared.ts
@@ -1,9 +1,7 @@
 import { ResolveHooks, Adapter, defineHooks } from "../src/index.ts";
 
 export const getIndexHTML = () =>
-  fetch(
-    "https://raw.githubusercontent.com/unjs/crossws/main/examples/h3/public/index.html",
-  ).then((res) => res.text());
+  import("./_index.html.ts").then((r) => r.default);
 
 export function createDemo>(
   adapter: T,