ENF News Bot
Automated News Bot
- Joined
- Apr 15, 2022
- Messages
- 2,591
TanStack Start ↗︎ apps can now prerender routes to static HTML at build time with access to build time environment variables and bindings, and serve them as static assets. To enable prerendering, configure the
vite.config.tsts
This feature requires
Continue reading...
prerender option of the TanStack Start plugin in your Vite config:vite.config.tsts
Code:
import { defineConfig } from "vite";
import { cloudflare } from "@cloudflare/vite-plugin";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
export default defineConfig({
plugins: [
cloudflare({ viteEnvironment: { name: "ssr" } }),
tanstackStart({
prerender: {
enabled: true,
},
}),
],
});
This feature requires
@tanstack/react-start v1.138.0 or later. See the TanStack Start framework guide for more details.Continue reading...