TanStack / TanStack/router

[@tanstack/react-start/plugin/rsbuild] tanstackStart() eclipses the client environment's output.assetPrefix, blocking downstream plugins

Open
#7,827 3 comments 3 reactions 0 assignees View on GitHub

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

tanstackStart() unconditionally writes assetPrefix to the client rsbuild environment in modifyRsbuildConfig. Because the environment override wins over the root value in rsbuild's merge, Start's write hides whatever the user (or a downstream plugin) had

Complete minimal reproducer

https://github.com/alexandre-marchina/tanstack-start-rsbuild-prefix-repro

Steps to Reproduce the Bug

In the repro above: npm run repro runs three configs (no user config with tanstackStart(), explicit output.assetPrefix with tanstackStart(), and a third without tanstackStart()) and prints the observed env override / effective / root values for each

Expected behavior

  • No output.assetPrefix and no server.base - Start writes nothing to the client environment
  • output.assetPrefix set - forwarded to the client environment
  • server.base set - takes precedence
Screenshots or Videos

No response

Platform
  • @tanstack/start-plugin-core: 1.168.x (latest)
  • @rsbuild/core: 2.1.5
  • @tanstack/react-start: 1.168.x
  • Environment: macOS, Node.js >= 20

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at tanstackStart() and its modifyRsbuildConfig handling for the client environment. Run npm run repro in the linked reproducer to compare the env override, effective, and root values across the three configurations. Done means assetPrefix is omitted when unset, forwarded when set, and overridden by server.base.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.