Building your application

Route pre-rendering

Edit this page

SolidStart offers a way to pre-render pages at build time. The easiest way to accomplish this, is by passing a list of routes to be pre-rendered to the routes option.

import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
prerender: {
routes: ["/", "/about"]
}
}
});

When you wish for all your routes to be pre-renderToBufferDestination, you can pass true to the crawlLinks option:

import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
prerender: {
crawlLinks: true
}
}
});

For more information on prerender options, check out Nitro's documentation

Report an issue with this page