You said no to the demo files. You got them anyway.
By Warya Wayne ·
The TanStack CLI asks whether you'd like demo and example pages. Answer no, and you'd still find demo files in your fresh project — components nothing rendered, images nothing referenced, hooks nothing called.
What was leaking
The filter deciding what counted as a demo file only matched two patterns: files under /routes/demo/, and files named /routes/demo.*.
Demo routes were correctly excluded. Everything supporting them was not:
- support files in
/lib/,/hooks/,/data/,/components/, and/store/ demo.index.csssitting at thesrc/root- example assets in
/public/—example-guitar-*.jpg,demo-neon.svg
All copied into new projects with no routes referencing any of it. Dead weight in the first commit of every project that opted out.
On top of that, the base scaffolding unconditionally shipped a Header, a Footer, a ThemeToggle, a styled landing page, and an About route — regardless of whether you'd asked for a minimal starter.
The fix
The core change was renaming isDemoRoutePath to isDemoFilePath — which tells you exactly what the bug was. The function was named after routes because it only ever thought about routes. The concept it actually needed to express was broader, and the name had been quietly holding it back.
Expanding it to cover support directories, extending filtering to add-on integrations rather than just routes and files, and converting the Better Auth header component into a template that renders null when its demo route is excluded — rather than linking to a route that no longer exists.
Two PRs became one
I'd opened #431. Another contributor, @wyMinLwin, had opened #429 against the same problem. Rather than picking one, the maintainers combined both into a single unified fix, added coverage for edge cases neither of us had caught, and preserved both original commits with author credit.
That's a good outcome and worth naming. Two people independently hitting the same friction is a strong signal the problem is real. And having your commit preserved inside someone else's merge is a perfectly good way to land a contribution — the goal was the fix, not the byline.
Closes #422 and #409. Merged as TanStack/cli#434.