Skip to content

refactor(start): use a single Rsbuild compiler loader - #8832

Draft
SyMind wants to merge 1 commit into
TanStack:mainfrom
SyMind:codex/start-compiler-loader-pr
Draft

SyMind wants to merge 1 commit into
TanStack:mainfrom
SyMind:codex/start-compiler-loader-pr

Conversation

@SyMind

@SyMind SyMind commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Changes

Rsbuild Start compilation currently uses api.transform plus a separate post loader to persist server-function metadata. Replace both with one pre loader that compiles the source and writes module.buildInfo in the same invocation.

  • Remove the pending metadata maps, loader-context setter, and metadata-only loader.
  • Keep compiler ownership, queued compilation, dependency tracking, watch invalidation, and cached metadata replay in the host.
  • Preserve pre-transform ordering, compiler virtual modules, source-map composition, and stale metadata clearing.

Local validation before rebasing onto current main:

  • Core unit tests: 885 passed, 1 expected failure; available unit/type/lint/package checks passed for core and React/Solid/Vue Start.
  • Four Rsbuild integration tests passed: warm cache, cache disabled, watch removal/restoration, and pre-transform ordering.
  • The module syntax-error overlay test passed.
  • All 18 bundle scenarios were unchanged from the preceding implementation refactor.

Local A/B experiments did not establish a consistent end-to-end speedup; this PR makes no performance claim.

AI-assisted implementation and tests using OpenAI Codex. Submitted as a draft for review.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with the relevant test commands, or tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@changeset-bot

changeset-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f9911d2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@tanstack/start-plugin-core Patch
@tanstack/react-start-rsc Patch
@tanstack/react-start Patch
@tanstack/solid-start Patch
@tanstack/vue-start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Replace api.transform and the separate metadata loader with one pre loader.
Preserve source maps, loader ordering, and cached server-function replay.
@SyMind
SyMind force-pushed the codex/start-compiler-loader-pr branch from 53d3ff5 to f9911d2 Compare October 30, 2026 01:19

This branch has not been deployed

No deployments
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.

1 participant