remix-island
Version:
utils to render remix into a dom-node instead of the whole document
13 lines (10 loc) • 340 B
JavaScript
import { createPagesFunctionHandler } from "@remix-run/cloudflare-pages";
import * as build from "@remix-run/dev/server-build";
const handleRequest = createPagesFunctionHandler({
build,
mode: process.env.NODE_ENV,
getLoadContext: (context) => context.env,
});
export function onRequest(context) {
return handleRequest(context);
}