Skip to content
Source
Sign inSign up
TanStack/router

Feature request: Native Bun bundler support for TanStack Start #8704

ClosedRentnerKev(GitHub profile, opens in a new tab) opened this issue 0 comments

Feature request

I'd like to propose native Bun bundler support for TanStack Start as an additional, opt-in build option alongside the existing Vite and Rsbuild integrations.

The idea is to use Bun's own bundling APIs (such as Bun.build()) to build a TanStack Start application, rather than simply running the existing Vite build through the Bun runtime.

Motivation

Bun already provides a fast, native JavaScript/TypeScript toolchain. For projects that use Bun as their package manager and runtime, being able to use its bundler directly could simplify the toolchain, reduce build overhead, and potentially improve build performance.

I would especially like to explore whether a native Bun integration can deliver faster production builds and lower resource usage. Any performance improvements should be validated with benchmarks against the existing build options rather than assumed.

Suggested approach

  • Make Bun an optional alternative, not a replacement for Vite or Rsbuild.
  • Start with a small, focused React / TanStack Start production-build integration.
  • Reuse TanStack's existing routing, compiler, and manifest logic wherever possible instead of reimplementing framework internals.
  • Preserve core functionality such as client/SSR builds, server functions, routing, code splitting, and asset handling.
  • Treat development-server/HMR support, RSC, additional frameworks, and deployment integrations as potential later work rather than requirements for the initial scope.
  • Keep the implementation maintainable, focused on Bun's native capabilities, and covered by tests and build benchmarks.

Questions for the maintainers

Would the team be open to an additional, native Bun-based build integration for TanStack Start?

Are there any architectural constraints or expectations you would want addressed before someone starts working on a minimal implementation?

I'd be interested in contributing to this, starting small and iterating based on feedback.

Sign in to join this conversation.