Build-time prerendering for fetch-shaped apps, and Solid's integration on top of it.
| Package | What it is |
|---|---|
prerender-crawler |
Framework-agnostic engine + Vite plugin. Crawls a Request -> Response handler at build time and writes the site out as static files. |
@solidjs/prerender |
Solid's piece: prerendered() turns server functions into build-time data captured as static artifacts; serverFunctions() plugs that into the crawl and guards static builds. |
// vite.config.ts
import solid from "@solidjs/vite-plugin";
import { prerender } from "prerender-crawler/vite";
import { serverFunctions } from "@solidjs/prerender/integration";
export default defineConfig({
plugins: [
solid({ start: true, ssr: true, serverFunctions: true }),
prerender({ mode: "static", integrations: [serverFunctions()] })
]
});vite build renders every page through the server build, follows links to find the rest, bakes each prerendered() server-function call into a JSON artifact, and leaves dist/client as the whole deployment — a Solid app with typed server-side data loading and no server.
See examples/ssg for a complete site.
pnpm install
pnpm build
pnpm testReleases use Changesets: add one under .changeset/ with any consumer-visible change.