TanStackT
TanStack5mo ago
17 replies
popular-magenta

SPA mode when deployed with SST

Has anyone used tanstack start in SPA mode when deployed in SST?

I have tried to deploy with spa: { enabled: true } but the deployment hangs after Client and Server bundles for TanStack Start have been successfully built.

Also I have tried to disable prerender but it is still attempting to prerender the shell

    tanstackStart({
      customViteReactPlugin: true,
      target: 'aws-lambda',
      spa: {
        enabled: true,
        prerender: {
          enabled: false,
        },
      },
    }),


✔ Generated public .output/public                                                  nitro 3:37:26 PM
[prerender] Prerendering pages...
[prerender] Concurrency: 14
[prerender] Crawling: /


I have a loader on my
/
route which I want to be run on the client, but not when creating the SPA shell. Should I just do

const isShell = useRouter().isShell()

if (isShell) return <div>Loading...</div>


or something along them lines?
Was this page helpful?