Skip to content

refactor(start): streamline Rsbuild environment configuration - #8137

Draft
SyMind wants to merge 7 commits into
TanStack:mainfrom
SyMind:improve-rsbuild-config-workflow
Draft

refactor(start): streamline Rsbuild environment configuration#8137
SyMind wants to merge 7 commits into
TanStack:mainfrom
SyMind:improve-rsbuild-config-workflow

Conversation

@SyMind

@SyMind SyMind commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR establishes a clearer Rsbuild configuration workflow for TanStack Start and fixes #7827.

flowchart LR
    D["Framework defaults<br/>Applied only when unset"]
    U["User config<br/>Native root and environment config"]
    E["Framework enforced config<br/>Applied last"]
    C{"Conflicts with<br/>an enforced value?"}
    W["Print warning with<br/>overridden paths"]
    F["Final Rsbuild config"]

    D -->|"lowest priority"| U
    U -->|"overrides defaults"| E
    E --> C
    C -->|"yes"| W
    C -->|"no"| F
    W --> F
Loading

The resulting precedence is:

framework defaults -> user config -> framework enforced config
  • Framework defaults provide working conventions but remain user-configurable.
  • User config uses native Rsbuild root and environment configuration.
  • Framework-enforced config contains values required by the TanStack Start runtime. Conflicts produce a warning.

Notable changes

  • Stop writing assetPrefix into the client environment, allowing root configuration and downstream plugins to work correctly.
  • Resolve development and production asset bases from dev.assetPrefix and output.assetPrefix.
  • Remove the Start-specific rsbuild.client.output and custom environment override abstractions.
  • Derive the manifest script format from the resolved client output.module.
  • Apply enforced entries, defines, and aliases consistently across client, SSR, and provider environments.

Testing

  • 519 unit tests passed.
  • Type tests passed with TypeScript 5.6–7.0.
  • ESLint passed.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0aa36007-6ee9-4c56-a5c7-3a995e12990e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SyMind

SyMind commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a1a68888b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/start-plugin-core/src/rsbuild/planning.ts Outdated
@SyMind

SyMind commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2199ef22b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/start-plugin-core/src/rsbuild/planning.ts
@SyMind

SyMind commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 04c933721f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant