Skip to content

ReactRouter

Source: src/Prisma/Website/ReactRouter.ts

React Router SSR and browser assets on Prisma Compute using the existing Node framework target.

Native framework development and HMR run without Prisma cloud resources. Apply Alchemy.remote() to use the live Compute deployment during dev. Packaging requires the optional @vercel/nft peer dependency.

const site = yield* Prisma.Website.ReactRouter("Web", {
rootDir: "./app",
});
const site = yield* Prisma.Website.ReactRouter("Web", {
project,
domain: "www.example.com",
env: { API_BASE: "https://api.example.com" },
compute: { destroyOldDeployment: true },
});