Skip to content
Source
Sign inSign up
TanStack/router

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

OpenSyMind(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/8832/headopened

🎯 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).
    1. changeset-bot[bot](GitHub profile, opens in a new tab)commented

      🦋 Changeset detected

      Latest commit: f9911d26ac39299dfb604f62b7a85a1db9fa6180

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

      This PR includes changesets to release 5 packages
      NameType
      @tanstack/start-plugin-corePatch
      @tanstack/react-start-rscPatch
      @tanstack/react-startPatch
      @tanstack/solid-startPatch
      @tanstack/vue-startPatch

      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

    2. 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.

Sign in to join this conversation.