aboutsummaryrefslogtreecommitdiff
path: root/demos/css-stress-test/framework.tsx
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-07-01 05:12:15 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-07-01 05:12:15 -0700
commit88aad6aeb19f3d1d73ced59a7a5aaddc2d7408ee (patch)
tree48c5a443c72d4739f154f2e9f63187b49bb78720 /demos/css-stress-test/framework.tsx
parenta8536a73373794dc9748a97f0e4668d6bf708ca1 (diff)
downloadbun-88aad6aeb19f3d1d73ced59a7a5aaddc2d7408ee.tar.gz
bun-88aad6aeb19f3d1d73ced59a7a5aaddc2d7408ee.tar.zst
bun-88aad6aeb19f3d1d73ced59a7a5aaddc2d7408ee.zip
this kind of works, but there is a crash when bundling. I think its missing a Stmt.Data.Store.reset()
Diffstat (limited to 'demos/css-stress-test/framework.tsx')
-rw-r--r--demos/css-stress-test/framework.tsx28
1 files changed, 28 insertions, 0 deletions
diff --git a/demos/css-stress-test/framework.tsx b/demos/css-stress-test/framework.tsx
new file mode 100644
index 000000000..0d1e5d18c
--- /dev/null
+++ b/demos/css-stress-test/framework.tsx
@@ -0,0 +1,28 @@
+import ReactDOMServer from "react-dom/server.browser";
+import { Base } from "./src/index";
+
+addEventListener("fetch", (event: FetchEvent) => {
+ const response = new Response(`
+ <!DOCTYPE html>
+<html>
+ <head>
+ <link
+ rel="stylesheet"
+ crossorigin="anonymous"
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&family=Space+Mono:wght@400;700"
+ />
+ </head>
+ <body>
+ <link rel="stylesheet" href="./src/index.css" />
+ <div id="reactroot">${ReactDOMServer.renderToString(<Base />)}</div>
+
+ <script src="./src/index.tsx" async type="module"></script>
+ </body>
+</html>
+ `);
+
+ event.respondWith(response);
+});
+
+// typescript isolated modules
+export {};