From 616ac03b47042264c7c8516764028a486c753a12 Mon Sep 17 00:00:00 2001 From: Nikolaj Frey Date: Tue, 27 Jun 2023 10:23:58 +1000 Subject: [PATCH] feat: tmp added entry.X.tsx files --- app/app/entry.client.tsx | 4 ++++ app/app/entry.server.tsx | 21 +++++++++++++++++++++ app/vercel.json | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 app/app/entry.client.tsx create mode 100644 app/app/entry.server.tsx create mode 100644 app/vercel.json diff --git a/app/app/entry.client.tsx b/app/app/entry.client.tsx new file mode 100644 index 0000000..d6483c3 --- /dev/null +++ b/app/app/entry.client.tsx @@ -0,0 +1,4 @@ +import { hydrate } from 'react-dom' +// import { RemixBrowser } from "remix"; +import { RemixBrowser } from '@remix-run/react' +hydrate(, document) diff --git a/app/app/entry.server.tsx b/app/app/entry.server.tsx new file mode 100644 index 0000000..d2051de --- /dev/null +++ b/app/app/entry.server.tsx @@ -0,0 +1,21 @@ +import { renderToString } from "react-dom/server"; +import { RemixServer } from "remix"; +import type { EntryContext } from "remix"; + +export default function handleRequest( + request: Request, + responseStatusCode: number, + responseHeaders: Headers, + remixContext: EntryContext +) { + let markup = renderToString( + + ); + + responseHeaders.set("Content-Type", "text/html"); + + return new Response("" + markup, { + status: responseStatusCode, + headers: responseHeaders + }); +} diff --git a/app/vercel.json b/app/vercel.json new file mode 100644 index 0000000..debafb4 --- /dev/null +++ b/app/vercel.json @@ -0,0 +1,7 @@ +{ + "build": { + "env": { + "ENABLE_FILE_SYSTEM_API": "1" + } + } +} \ No newline at end of file