We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3241ae1 commit 40526a9Copy full SHA for 40526a9
packages/plugin-rsc/examples/basic/src/server.tsx
@@ -1,7 +1,7 @@
1
import { handleRequest } from './framework/entry.rsc.tsx'
2
import './styles.css'
3
4
-export default async function handler(request: Request): Promise<Response> {
+async function handler(request: Request): Promise<Response> {
5
const url = new URL(request.url)
6
const { Root } = await import('./routes/root.tsx')
7
const nonce = !process.env.NO_CSP ? crypto.randomUUID() : undefined
@@ -38,6 +38,10 @@ export default async function handler(request: Request): Promise<Response> {
38
return response
39
}
40
41
+export default {
42
+ fetch: handler,
43
+}
44
+
45
if (import.meta.hot) {
46
import.meta.hot.accept()
47
0 commit comments