Skip to content

SPA mode server build contains unnecessary SSR code #5059

@StevenPewsey

Description

@StevenPewsey

Which project does this relate to?

Start

Describe the bug

When running tanstack start in SPA mode, the server build contains SSR code.

Your Example Website or App

Steps to Reproduce the Bug or Issue

Add

spa: {
  enabled: true,
}

to the tanstackStart vite plugin config

Run npm build

The built .output/server contains code that would be used to server side render the application. However this isn't actually used at runtime.

Expected behavior

The built .output/server only contains the code needed to run server functions/api routes, so it is as slim as possible.

Screenshots or Videos

No response

Platform

  • Start Version: 1.131.31
  • OS: macOS
  • Bundler: vite
  • Bundler Version: 7.1.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions