aboutsummaryrefslogtreecommitdiff
path: root/bench/react-hello-world/react-hello-world.jsx
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-21 01:00:27 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-21 01:00:27 -0700
commitc4580ee2ca8fb883c5357546edad94bc93026248 (patch)
treee8b59f46f4e7211469cdb5c70b508a46da6c39a4 /bench/react-hello-world/react-hello-world.jsx
parenta8fa61ed68aa677e1a57c24b0fa93a662ee840d9 (diff)
downloadbun-c4580ee2ca8fb883c5357546edad94bc93026248.tar.gz
bun-c4580ee2ca8fb883c5357546edad94bc93026248.tar.zst
bun-c4580ee2ca8fb883c5357546edad94bc93026248.zip
Rename reactdom-bun -> react-dom-server.bun
Diffstat (limited to 'bench/react-hello-world/react-hello-world.jsx')
-rw-r--r--bench/react-hello-world/react-hello-world.jsx19
1 files changed, 14 insertions, 5 deletions
diff --git a/bench/react-hello-world/react-hello-world.jsx b/bench/react-hello-world/react-hello-world.jsx
index 15f2b000b..a61ad7567 100644
--- a/bench/react-hello-world/react-hello-world.jsx
+++ b/bench/react-hello-world/react-hello-world.jsx
@@ -1,9 +1,13 @@
-import { renderToReadableStream } from "../../test/bun.js/reactdom-bun.js";
+// to run this:
+// bun react-hello-world.jsx --jsx-production
+// This will become the official react-dom/server.bun build a little later
+// It will be the default when you import from "react-dom/server"
+// That will work via the "bun" package.json export condition (which bun already supports)
+import { renderToReadableStream } from "../../test/bun.js/react-dom-server.bun";
const headers = {
headers: {
"Content-Type": "text/html",
- "Cache-Control": "no-transform", // set to match the Deno benchmark, which requires this for an apples to apples comparison
},
};
@@ -11,12 +15,17 @@ const App = () => (
<html>
<body>
<h1>Hello World</h1>
+ <p>This is an example.</p>
</body>
</html>
);
-export default {
+const port = Number(process.env.PORT || 3001);
+Bun.serve({
+ port,
async fetch(req) {
- return new Response(await renderToReadableStream(<App />), headers);
+ return new Response(await renderToReadableStream(<App />));
},
-};
+});
+
+console.log(`Server running on\n http://localhost:${port}`);
='q' value=''/>
path: root/packages/integrations/netlify/test/edge-functions/fixtures/prerender (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-31Revert "feat(hybrid): unflag hybrid output (#7255)" (#7259)Gravatar Nate Moore 1-0/+7
This reverts commit bc5d6ed39faf2f73eab161774bf66ebc5fd00db2.
2023-05-31[ci] formatGravatar natemoo-re 3-13/+8
2023-05-31feat(hybrid): unflag hybrid output (#7255)Gravatar Nate Moore 29-130/+61
2023-05-31Markdoc: strip HTML comments from output (#7224)Gravatar Ben Holmes 2-1/+13
* feat: strip HTML comments from output * chore: changeset
2023-05-30Fix out-of-date example dependencies (#7248)Gravatar Ben Holmes 33-198/+211
* revert changeset patch * deps: bump astro across examples * deps: bump @astrojs packages across examples * deps: bump @astrojs/markdoc
2023-05-30[ci] release (#7190)astro@2.5.6@astrojs/webapi@2.2.0@astrojs/vue@2.2.1@astrojs/vercel@3.4.1@astrojs/sitemap@1.3.2@astrojs/react@2.2.1@astrojs/preact@2.2.1@astrojs/partytown@1.2.3@astrojs/mdx@0.19.5@astrojs/markdoc@0.3.0Gravatar Houston (Bot) 48-171/+216
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-30Content collections - fix `.json` collection errors (#7246)Gravatar Ben Holmes 4-7/+52
* fix: avoid error on collectionType === 'unknown' * fix: ignore underscores in file globs * chore: clarify [!_] * fix: mismatch error not throwing * fix: bad collectionType var * test: no error for empty collection * chore: changeset
2023-05-30[ci] formatGravatar bholmesdev 4-5/+5
2023-05-30Markdoc - remove `$entry` variable (#7244)Gravatar Ben Holmes 16-257/+217
* refactor: remove entry prop from `getRenderModule()` * refactor: remove `$entry` from markdoc * test: update entry-prop -> variables test * refactor: unify `getEntryConfigByExt` * chore: clean up shared content / data get logic * docs: update `$entry` recommendation * chore: rename entry-prop -> variables * chore: changeset * chore: missed a spot
2023-05-30Markdoc: new README for Markdoc nodes (#7225)Gravatar Ben Holmes 1-46/+85
* docs: all-new nodes documentation * edit: `.astro` ONLY Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * edit: `.` outside links, line break Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * edit: such as, not like Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * edit: more Astro less probs Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * edit: reviewers React to Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * edit: tagz Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * chore: add `default: 'article'` for document * edit: reword client-side instructions * edit: prism stylesheet got lost * fix: heading -> blockquote --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-30[ci] formatGravatar MoustaphaDev 1-1/+1
2023-05-30fix: prioritize dynamic prerendered routes over dynamic server routes (#7235)Gravatar Happydev 6-19/+361
* test: add unit tests * fix: prioritize prerendered routes * chore: fix test * add comment * test: try avoiding race condition * chore: changeset * try avoiding race conditions attempt #2 * try avoiding race conditions (attempt 3) * final fix hopefuly * tet: add more tests * sort conflicting dynamic routes aplhabetically * test: fix test
2023-05-30[ci] formatGravatar matthewp 1-5/+8
2023-05-30Bug 6672 (#7062)Gravatar wulinsheng123 10-0/+138
* fix miss a head when the templaterender has a promise * fix * add some test * test files move to md directory * fix add * delect file --------- Co-authored-by: wuls <linsheng.wu@beantechs.com>