diff --git a/examples/hono-react-vercel-edge/readme.md b/examples/hono-react-vercel-edge/readme.md index e25deaf..ed9dda9 100644 --- a/examples/hono-react-vercel-edge/readme.md +++ b/examples/hono-react-vercel-edge/readme.md @@ -11,4 +11,4 @@ npm run dev Deploy the example using [Vercel](https://vercel.com): -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vikejs/vike-node/tree/main/examples/hono-react-vercel-edge&project-name=hono-react&repository-name=hono-react) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vikejs/vike-node/tree/vercel-edge/examples/hono-react-vercel-edge&project-name=hono-react&repository-name=hono-react) diff --git a/packages/vike-node/src/runtime/handler-web.ts b/packages/vike-node/src/runtime/handler-web.ts index 5667dbb..cb1e2be 100644 --- a/packages/vike-node/src/runtime/handler-web.ts +++ b/packages/vike-node/src/runtime/handler-web.ts @@ -1,7 +1,5 @@ -import { assert } from '../utils/assert.js' -import { isNodeLike } from '../utils/isNodeLike.js' -import { globalStore } from './globalStore.js' -import { VikeOptions, WebHandler } from './types.js' +// import { isNodeLike } from '../utils/isNodeLike.js' +import type { VikeOptions, WebHandler } from './types.js' import { renderPage } from './vike-handler.js' export function createHandler(options: VikeOptions = {}) { @@ -12,15 +10,15 @@ export function createHandler(options: VikeOptions handler!({ req, res, platformRequest, next })) - } - return nodeHandler(request) - } + // nodeLike ??= await isNodeLike() + // if (nodeLike) { + // if (!nodeHandler) { + // const connectToWeb = (await import('./adapters/connectToWeb.js')).connectToWeb + // const handler = (await import('./handler.js')).createHandler(options) + // nodeHandler = connectToWeb((req, res, next) => handler!({ req, res, platformRequest, next })) + // } + // return nodeHandler(request) + // } const httpResponse = await renderPage({ request,