Skip to content

Start: Dev server takes 5-12s to boot on fresh/cold start (SPA mode, Vite 8) #7091

@abed-daloopa

Description

@abed-daloopa

Which project does this relate to?

Start

Describe the bug

The first bun run dev command, or running it after a period of inactivity, takes 5–12 seconds to boot the dev server. Subsequent runs are fast, but any cold start (e.g. after rm -rf node_modules && bun install) consistently shows this delay.

I'm unsure whether this is a Vite 8 issue or a general TanStack Start problem. However, this occurs with a very simple fresh project.

I'm using a MacBook M3 Pro, so I don't believe this is a device-related issue.

Note: I am using SPA mode.

Your Example Website or App

https://github.com/abed-daloopa/tanstack-start-dev-server-slow-start

Steps to Reproduce the Bug or Issue

  1. Clone the repo: git clone https://github.com/abed-daloopa/tanstack-start-dev-server-slow-start
  2. cd tanstack-start-dev-server-slow-start
  3. rm -rf node_modules
  4. bun install
  5. bun run dev
  6. Observe the startup time

Expected behavior

The dev server should start more quickly

Screenshots or Videos

Image

Platform

  • Start Version: 1.167.16
  • Router Version: 1.168.10
  • Router Plugin Version: 1.167.12
  • OS: macOS (Apple M3 Pro)
  • Bundler: Vite 8.0.3
  • Runtime: Bun

Additional context

  • This happens consistently on cold starts (after clearing node_modules or after a period of inactivity).
  • Warm/subsequent starts are noticeably faster.
  • The project is minimal, essentially a fresh TanStack Start setup with SPA mode enabled.
  • Could potentially be related to Vite 8 or the router plugin initialization.

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