Skip to content
Source
Sign inSign up
TanStack/router

test: reproduce circular route module references #8877

Openbeaussan(GitHub profile, opens in a new tab)wants to merge 1 commit intomonorepo fromcodex/route-module-circular-referencesopened

Reproduction

Account already links to Products. Add a Products link back to Account, declaring the corresponding uses and workspace dependency, so both modules need each other's route contracts. The application mounts both modules. Add a browser scenario for navigating from Account to Products and back.

The declaration projects use composite TypeScript project references in both directions to model a monorepo that builds provider declarations before consumers. Route modules do not otherwise require this configuration.

This is an intentionally failing, stacked reproduction. From a clean workspace, generating either module first fails because the other module's route manifest is absent. The browser scenario cannot start until the build graph is resolved.

Validation

  • test:unit:cycle: both generation orders fail on the other module's missing manifest.
  • Products check:references: TypeScript reports TS6202 for the circular project references.
  • Products emit-types: Nx reports a cycle through both modules' generate and emit-types tasks.
  • Fixture test:types,test:e2e: Nx reports the same task cycle before tests or the browser start.
  • pnpm format and git diff --check pass. The full bundle benchmark completes, but its scenarios do not include this fixture and cannot validate its bundle.
    1. 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
    2. ⚠️ No Changeset found

      Latest commit: 53c6a8c17fd819f27018e0ad6e810dacfd87b631

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

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

    3. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 53c6a8c17fd819f27018e0ad6e810dacfd87b631

      CommandStatusDurationResult
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 55sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-11-04 22:06:31 UTC

    4. 🚀 Changeset Version Preview

      16 package(s) bumped directly, 13 bumped as dependents.

      🟨 Minor bumps

      PackageVersionReason
      @tanstack/eslint-plugin-router1.162.0 → 1.163.0Changeset
      @tanstack/react-router1.170.46 → 1.171.0Changeset
      @tanstack/react-start1.169.4 → 1.170.0Changeset
      @tanstack/react-start-rsc0.1.65 → 0.2.0Changeset
      @tanstack/router-cli1.167.46 → 1.168.0Changeset
      @tanstack/router-core1.171.39 → 1.172.0Changeset
      @tanstack/router-devtools-core1.168.2 → 1.169.0Changeset
      @tanstack/router-generator1.167.46 → 1.168.0Changeset
      @tanstack/router-plugin1.168.48 → 1.169.0Changeset
      @tanstack/router-vite-plugin1.167.48 → 1.168.0Changeset
      @tanstack/solid-router1.170.43 → 1.171.0Changeset
      @tanstack/solid-start1.169.4 → 1.170.0Changeset
      @tanstack/start-client-core1.170.39 → 1.171.0Changeset
      @tanstack/start-plugin-core1.171.55 → 1.172.0Changeset
      @tanstack/vue-router1.170.42 → 1.171.0Changeset
      @tanstack/vue-start1.169.4 → 1.170.0Changeset

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/react-router-devtools1.167.2 → 1.167.3Dependent
      @tanstack/react-start-client1.168.44 → 1.168.45Dependent
      @tanstack/react-start-server1.167.52 → 1.167.53Dependent
      @tanstack/router-devtools1.167.2 → 1.167.3Dependent
      @tanstack/solid-router-devtools1.167.2 → 1.167.3Dependent
      @tanstack/solid-start-client1.168.42 → 1.168.43Dependent
      @tanstack/solid-start-server1.167.50 → 1.167.51Dependent
      @tanstack/start-server-core1.169.45 → 1.169.46Dependent
      @tanstack/start-static-server-functions1.167.44 → 1.167.45Dependent
      @tanstack/start-storage-context1.167.41 → 1.167.42Dependent
      @tanstack/vue-router-devtools1.167.2 → 1.167.3Dependent
      @tanstack/vue-start-client1.167.45 → 1.167.46Dependent
      @tanstack/vue-start-server1.167.50 → 1.167.51Dependent
    5. Bundle Size Benchmarks

      • Commit: 294a7a0739d7
      • Measured at: 2026-11-04T22:06:04.866Z
      • Baseline source: history:c5320d7ca23e
      • Dashboard: bundle-size history

      The following scenarios have bundle-size changes or lack baseline data for comparison:

      ScenarioCurrent (gzip)Initial (gzip)RawBrotliTrend
      react-router.route-modules87.0 KiB
      n/a
      86.6 KiB
      n/a
      266.0 KiB
      n/a
      76.4 KiB
      n/a
      ▅
      solid-router.full38.3 KiB
      +4 B
      38.1 KiB
      +4 B
      110.0 KiB
      +6 B
      34.5 KiB
      -28 B
      ▁▁▁▁▁▁▁▁▁▁▁█
      vue-router.minimal49.4 KiB
      -15 B
      49.3 KiB
      -14 B
      136.4 KiB
      -34 B
      44.8 KiB
      -22 B
      ███████████▁
      vue-router.full55.0 KiB
      +29 B
      54.9 KiB
      +29 B
      154.7 KiB
      +98 B
      49.7 KiB
      +28 B
      ▁▁▁▁▁▁▁▁▁▁▁█
      react-start.route-modules99.7 KiB
      n/a
      99.3 KiB
      n/a
      307.0 KiB
      n/a
      87.5 KiB
      n/a
      ▅
      react-start.deferred-hydration97.5 KiB
      0 B
      96.7 KiB
      0 B
      303.7 KiB
      -2 B
      84.7 KiB
      -7 B
      ▅▅▅▅▅▅▅▅▅▅▅
      react-start.rsbuild.minimal100.6 KiB
      +237 B
      100.4 KiB
      +235 B
      313.9 KiB
      +617 B
      86.9 KiB
      +241 B
      ▁▁▁▁▁▁▁▁▁▁▁█
      react-start.rsbuild.minimal-iife101.0 KiB
      +239 B
      100.8 KiB
      +238 B
      314.8 KiB
      +617 B
      87.2 KiB
      +279 B
      ▁▁▁▁▁▁▁▁▁▁▁█
      react-start.rsbuild.full103.8 KiB
      +252 B
      103.6 KiB
      +250 B
      323.5 KiB
      +622 B
      89.6 KiB
      +364 B
      ▁▁▁▁▁▁▁▁▁▁▁█
      solid-start.full51.2 KiB
      +11 B
      51.1 KiB
      +7 B
      150.0 KiB
      +4 B
      45.4 KiB
      -42 B
      ▁▁▁▁▁▁▁▁▁▁▁█
      vue-start.minimal65.4 KiB
      -13 B
      65.2 KiB
      -12 B
      185.7 KiB
      -38 B
      58.5 KiB
      +29 B
      ███████████▁
      vue-start.full69.2 KiB
      +45 B
      69.0 KiB
      +44 B
      197.6 KiB
      +97 B
      61.7 KiB
      +53 B
      ▁▁▁▁▁▁▁▁▁▁▁█

      Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.

    6. More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/@tanstack/arktype-adapter@8877

      @tanstack/eslint-plugin-router

      npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@8877

      @tanstack/eslint-plugin-start

      npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8877

      @tanstack/history

      npm i https://pkg.pr.new/@tanstack/history@8877

      @tanstack/react-router

      npm i https://pkg.pr.new/@tanstack/react-router@8877

      @tanstack/react-router-devtools

      npm i https://pkg.pr.new/@tanstack/react-router-devtools@8877

      @tanstack/react-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@8877

      @tanstack/react-start

      npm i https://pkg.pr.new/@tanstack/react-start@8877

      @tanstack/react-start-client

      npm i https://pkg.pr.new/@tanstack/react-start-client@8877

      @tanstack/react-start-rsc

      npm i https://pkg.pr.new/@tanstack/react-start-rsc@8877

      @tanstack/react-start-server

      npm i https://pkg.pr.new/@tanstack/react-start-server@8877

      @tanstack/router-cli

      npm i https://pkg.pr.new/@tanstack/router-cli@8877

      @tanstack/router-core

      npm i https://pkg.pr.new/@tanstack/router-core@8877

      @tanstack/router-devtools

      npm i https://pkg.pr.new/@tanstack/router-devtools@8877

      @tanstack/router-devtools-core

      npm i https://pkg.pr.new/@tanstack/router-devtools-core@8877

      @tanstack/router-generator

      npm i https://pkg.pr.new/@tanstack/router-generator@8877

      @tanstack/router-plugin

      npm i https://pkg.pr.new/@tanstack/router-plugin@8877

      @tanstack/router-ssr-query-core

      npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@8877

      @tanstack/router-utils

      npm i https://pkg.pr.new/@tanstack/router-utils@8877

      @tanstack/router-vite-plugin

      npm i https://pkg.pr.new/@tanstack/router-vite-plugin@8877

      @tanstack/solid-router

      npm i https://pkg.pr.new/@tanstack/solid-router@8877

      @tanstack/solid-router-devtools

      npm i https://pkg.pr.new/@tanstack/solid-router-devtools@8877

      @tanstack/solid-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@8877

      @tanstack/solid-start

      npm i https://pkg.pr.new/@tanstack/solid-start@8877

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/@tanstack/solid-start-client@8877

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/@tanstack/solid-start-server@8877

      @tanstack/start-client-core

      npm i https://pkg.pr.new/@tanstack/start-client-core@8877

      @tanstack/start-fn-stubs

      npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8877

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/@tanstack/start-plugin-core@8877

      @tanstack/start-server-core

      npm i https://pkg.pr.new/@tanstack/start-server-core@8877

      @tanstack/start-static-server-functions

      npm i https://pkg.pr.new/@tanstack/start-static-server-functions@8877

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/@tanstack/start-storage-context@8877

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/@tanstack/valibot-adapter@8877

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8877

      @tanstack/vue-router

      npm i https://pkg.pr.new/@tanstack/vue-router@8877

      @tanstack/vue-router-devtools

      npm i https://pkg.pr.new/@tanstack/vue-router-devtools@8877

      @tanstack/vue-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@8877

      @tanstack/vue-start

      npm i https://pkg.pr.new/@tanstack/vue-start@8877

      @tanstack/vue-start-client

      npm i https://pkg.pr.new/@tanstack/vue-start-client@8877

      @tanstack/vue-start-server

      npm i https://pkg.pr.new/@tanstack/vue-start-server@8877

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/@tanstack/zod-adapter@8877

      commit: 53c6a8c

Sign in to join this conversation.