Start: Dev server takes 5-12s to boot on fresh/cold start (SPA mode, Vite 8)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
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
- Clone the repo:
git clone https://github.com/abed-daloopa/tanstack-start-dev-server-slow-start cd tanstack-start-dev-server-slow-startrm -rf node_modulesbun installbun run dev- Observe the startup time
Expected behavior
The dev server should start more quickly
Screenshots or Videos
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_modulesor 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction repository and run the listed rm -rf node_modules, bun install, and bun run dev steps. Compare cold and warm startup times while investigating whether Vite 8 or router plugin initialization accounts for the delay. Done means identifying the responsible initialization path and demonstrating a faster cold start with regression coverage if applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, typescript, vite
- Domain
- build-system, developer-experience, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100