From 7c63fad55a49d8ea0a29b116e059405368852cb4 Mon Sep 17 00:00:00 2001 From: Yunfei He Date: Sat, 28 Nov 2026 10:33:11 +0800 Subject: [PATCH] docs(react-router): build with React Router's CLI when prerendering --- docs/integrations/frameworks/react-router.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/integrations/frameworks/react-router.md b/docs/integrations/frameworks/react-router.md index 149f739c1..42aad780b 100644 --- a/docs/integrations/frameworks/react-router.md +++ b/docs/integrations/frameworks/react-router.md @@ -46,6 +46,18 @@ void auth login void deploy ``` +If you use React Router 8 and `react-router.config.ts` sets `prerender`, tell Void to build with React Router's CLI: + +```ts +import { defineConfig } from 'void/config'; + +export default defineConfig({ + inference: { build: 'react-router build' }, +}); +``` + +Otherwise `void deploy` runs `vite build` (or `vp build` with Vite+), which doesn't exit after React Router 8 prerenders ([remix-run/react-router#15427](https://github.com/remix-run/react-router/issues/15427)), so the deploy never reaches the upload. + ## Using Void Features Most [Void platform features](../../guide/app-types.md#void-apps) work with React Router. Use them in loaders and actions: