Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 768 Bytes

File metadata and controls

34 lines (27 loc) · 768 Bytes
title Route pre-rendering

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-rendered, 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