TanStackT
TanStack3mo ago
11 replies
efficient-indigo

Can't figure out why / isn't pre-rendered in SPA mode

Here's my config:
    tanstackStart({
      spa: {
        enabled: true,
        prerender: {
          enabled: true,
        },
      },

I see this in the output while building:
[prerender] Prerendering pages...
[prerender] Concurrency: 16
[prerender] Crawling: /
[prerender] Prerendered 1 pages:
[prerender] - /

But then when I inspect the output in /dist/client the only html file is _shell.html, which does not contain the content from my base route
/
. Deploying and loading as a static site confirms that the shell is rendered immediately and the main content loads in afterwards. Something I'm missing or misunderstanding perhaps?
Was this page helpful?