Skip to content
Source
Sign inSign up
TanStack/router

fix: unify virtual module handling for Start Vite plugins #7178

Mergedschiller-manuel(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/7178/headmerged by schiller-manuel(GitHub profile, opens in a new tab)

fixes #6588

Summary by CodeRabbit

  • Bug Fixes

    • Improved virtual-module resolution in pnpm workspaces so the client entry is served reliably.
  • New Features

    • Generates and registers a virtual client entry to ensure correct client bundle wiring.
    • Adds a lightweight release metadata entry for patch publishing.
  • Refactor

    • Centralized and simplified virtual-module handling and consolidated related exports for a cleaner plugin surface.
  • Tests

    • Added tests validating virtual module resolution, id encoding, and client-entry generation.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-start

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-start

    3. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-plugin-core

    4. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: vue-start

    5. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-start-rsc

    6. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Note

      Reviews paused

      It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

      Use the following commands to manage reviews:

      • @coderabbitai resume to resume automatic reviews.
      • @coderabbitai review to trigger a single review.

      Use the checkboxes below for quick actions:

      • ▶️ Resume reviews
      • 🔍 Trigger review

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro

      Run ID: 02a2b577-bd99-4deb-b504-16cf8468df34

      📥 Commits

      Reviewing files that changed from the base of the PR and between b4b117267223f7ed14dbd6357a6ccf56f6ab55b0 and b8c884e1371cef18e12686af125bd741cf90bc84.

      📒 Files selected for processing (1)
      • packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      🚧 Files skipped from review as they are similar to previous changes (1)
      • packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts

      📝 Walkthrough

      Walkthrough

      Adds a shared Vite virtual-module factory (createVirtualModule), migrates multiple Start plugins to use it, introduces a virtual client-entry plugin, updates core exports and consumer type imports, adds tests, and includes a changeset describing virtual-module resolution fixes.

      Changes

      Cohort / File(s)Summary
      New core utility
      packages/start-plugin-core/src/vite/createVirtualModule.ts
      Adds createVirtualModule factory to standardize Vite virtual-module resolveId/load wiring and escape # in module IDs.
      Core plugin migrations
      packages/start-plugin-core/src/vite/dev-server-plugin/plugin.ts, packages/start-plugin-core/src/vite/serialization-adapters-plugin.ts, packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts, packages/start-plugin-core/src/vite/start-manifest-plugin/plugin.ts
      Replaces inline virtual-module implementations with createVirtualModule, removing bespoke resolve/load filtering and local ID-escaping logic.
      Virtual client entry
      packages/start-plugin-core/src/vite/plugins.ts, packages/start-plugin-core/src/vite/plugin.ts
      Adds createVirtualClientEntryPlugin and registers it to emit a normalized virtual client entry before manifest generation.
      Exports & manifest
      packages/start-plugin-core/src/index.ts, packages/start-plugin-core/package.json
      Exports createVirtualModule and an additional type; removes ./vite/types package subpath export.
      Consumer import updates
      packages/react-start/src/plugin/vite.ts, packages/react-start-rsc/src/plugin/vite.ts, packages/solid-start/src/plugin/vite.ts, packages/vue-start/src/plugin/vite.ts
      Consolidates type-only imports to use root @tanstack/start-plugin-core exports; react-start-rsc now uses shared createVirtualModule.
      Tests added
      packages/start-plugin-core/tests/createVirtualModule.test.ts, packages/start-plugin-core/tests/virtual-client-entry-plugin.test.ts
      Adds Vitest suites validating Vite-prefixed IDs, hash-escaping, and client-entry path normalization.
      Changeset metadata
      .changeset/rare-pigs-smash.md
      Adds changeset describing patch-level release and virtual-module resolution fixes.

      Sequence Diagram(s)

      sequenceDiagram
          participant Browser as Browser (Client)
          participant Vite as Vite Dev Server
          participant Plugin as Start Plugin Core (createVirtualModule)
          participant Config as ConfigResolver/Entry Planner
      
          Browser->>Vite: GET /@id/virtual:tanstack-start-client-entry
          Vite->>Plugin: resolveId("virtual:tanstack-start-client-entry")
          Plugin->>Config: getClientEntry()
          Config-->>Plugin: client entry path
          Plugin-->>Vite: resolved id ("\0virtual:tanstack-start-client-entry")
          Vite->>Plugin: load(resolved id)
          Plugin-->>Vite: module source (import "normalized/path/to/client")
          Vite-->>Browser: module source (200)
          Browser->>Vite: dynamic import → hydration

      Estimated code review effort

      🎯 4 (Complex) | ⏱️ ~45 minutes

      Suggested reviewers

      • lachlancollins

      Poem

      🐰 I nibbled through symlinks, found a better way, a tidy virtual gate where requests now play, hashes tucked safe, paths march straight and true, Vite hands the entry, hydration hops through, carrots for tests — a celebratory chew! 🥕✨

      🚥 Pre-merge checks | ✅ 4 | ❌ 1

      ❌ Failed checks (1 warning)

      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
      ✅ Passed checks (4 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title check✅ PassedThe PR title 'fix: unify virtual module handling for Start Vite plugins' accurately describes the main change—consolidating virtual module creation logic into a shared createVirtualModule helper across multiple plugin files.
      Linked Issues check✅ PassedThe PR fully addresses issue #6588 by implementing a new shared createVirtualModule helper and a createVirtualClientEntryPlugin that serve the client entry through a real Vite virtual module, resolving symlink issues in pnpm workspaces.
      Out of Scope Changes check✅ PassedAll changes are directly scoped to unifying virtual module handling: removing the ./vite/types export path, refactoring existing virtual module implementations to use the shared helper, and consolidating type imports across framework plugins.
      ✏️ Tip: You can configure your own custom pre-merge checks in the settings.
      ✨ Finishing Touches
      📝 Generate docstrings
      • Create stacked PR
      • Commit on current branch
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `fix-6588`

      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    7. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit b8c884e1371cef18e12686af125bd741cf90bc84

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded9m 3sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded30sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-04-13 20:35:24 UTC

    8. github-actions[bot](GitHub profile, opens in a new tab)commented

      🚀 Changeset Version Preview

      2 package(s) bumped directly, 3 bumped as dependents.

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/react-start-rsc0.0.15 → 0.0.16Changeset
      @tanstack/start-plugin-core1.167.32 → 1.167.33Changeset
      @tanstack/react-start1.167.35 → 1.167.36Dependent
      @tanstack/solid-start1.167.33 → 1.167.34Dependent
      @tanstack/vue-start1.167.33 → 1.167.34Dependent
    9. github-actions[bot](GitHub profile, opens in a new tab)commented

      Bundle Size Benchmarks

      • Commit: c373feb22b06
      • Measured at: 2026-04-13T20:27:11.366Z
      • Baseline source: history:328d7e5ebc6b
      • Dashboard: bundle-size history
      ScenarioCurrent (gzip)Delta vs baselineRawBrotliTrend
      react-router.minimal87.33 KiB0 B (0.00%)274.58 KiB75.97 KiB███▇▇▇▇▇▁▁▁
      react-router.full90.59 KiB0 B (0.00%)285.66 KiB78.72 KiB████████▁▁▁
      solid-router.minimal35.50 KiB0 B (0.00%)106.58 KiB31.88 KiB███▇▇▇▇▇▁▁▁
      solid-router.full39.98 KiB0 B (0.00%)120.08 KiB35.93 KiB████████▁▁▁
      vue-router.minimal53.30 KiB0 B (0.00%)151.99 KiB47.86 KiB████████▁▁▁
      vue-router.full58.19 KiB0 B (0.00%)167.41 KiB52.09 KiB████████▁▁▁
      react-start.minimal101.73 KiB0 B (0.00%)322.31 KiB87.94 KiB████████▁▁▁
      react-start.full105.17 KiB0 B (0.00%)332.64 KiB90.84 KiB███▇▇▇▇▇▁▁▁
      solid-start.minimal49.50 KiB0 B (0.00%)152.39 KiB43.63 KiB████████▁▁▁
      solid-start.full55.03 KiB0 B (0.00%)168.60 KiB48.41 KiB████████▁▁▁

      Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.

    10. pkg-pr-new[bot](GitHub profile, opens in a new tab)commented
      More templates

      @tanstack/arktype-adapter

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

      @tanstack/eslint-plugin-router

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

      @tanstack/eslint-plugin-start

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

      npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7178

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-rsc

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-fn-stubs

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/vue-router

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

      @tanstack/vue-router-devtools

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

      @tanstack/vue-router-ssr-query

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

      @tanstack/vue-start

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

      @tanstack/vue-start-client

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

      @tanstack/vue-start-server

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

      @tanstack/zod-adapter

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

      commit: b8c884e

    11. Actionable comments posted: 5

      🧹 Nitpick comments (3)
      packages/start-plugin-core/tests/createVirtualModule.test.ts (1)

      1-38: LGTM! Good coverage of core virtual module ID resolution behavior.

      The tests effectively validate the \0 prefix for Vite virtual modules and the # → %23 encoding for hash-prefixed module IDs. The as any casts are acceptable here for accessing plugin internals in test code.

      Consider adding edge case tests for non-matching IDs to verify the handler returns undefined:

      💡 Optional: Additional edge case test
      +  test('returns undefined for non-matching ids', () => {
      +    const plugin = createVirtualModule({
      +      name: 'test-non-match',
      +      moduleId: 'virtual:test-module',
      +      load() {
      +        return 'export const ok = true'
      +      },
      +    })
      +
      +    expect((plugin as any).resolveId.handler('virtual:other-module')).toBeUndefined()
      +    expect((plugin as any).load.handler('\0virtual:other-module')).toBeUndefined()
      +  })

      ,

      🤖 Prompt for AI Agents
      Verify each finding against the current code and only fix it if needed.
      
      In `@packages/start-plugin-core/tests/createVirtualModule.test.ts` around lines 1
      - 38, Add an edge-case test in createVirtualModule.test.ts that ensures
      resolveId.handler and load.handler return undefined for non-matching IDs: create
      another test using a plugin from createVirtualModule (e.g., moduleId
      'virtual:test-module' and '#virtual:test-module') and call resolveId.handler and
      load.handler with unrelated strings (like 'other-module' and '\0other-module')
      asserting they return undefined to validate non-matching behavior.
      packages/start-plugin-core/src/vite/createVirtualModule.ts (1)

      4-7: Consider using Vite's plugin context type instead of any for better type safety.

      The this: any type loses compile-time safety for properties like this.environment, this.error(), etc. that are used in the load handlers throughout this PR.

      💡 Optional: Stricter typing using Vite's plugin context
      +import type { Plugin, PluginContext } from 'vite'
      +
      +// Vite's load handler receives a PluginContext-like object with environment info
      +interface VirtualModuleLoadContext extends PluginContext {
      +  environment: { name: string; mode: string; config: { command: string; consumer?: string } }
      +}
      
       type VirtualModuleLoadHandler = (
      -  this: any,
      +  this: VirtualModuleLoadContext,
         id: string,
       ) => string | null | undefined | Promise<string | null | undefined>

      This is optional since any provides flexibility, but stricter types would catch misuse at compile time.

      🤖 Prompt for AI Agents
      Verify each finding against the current code and only fix it if needed.
      
      In `@packages/start-plugin-core/src/vite/createVirtualModule.ts` around lines 4 -
      7, Replace the unsafe this: any in the VirtualModuleLoadHandler type with Vite's
      PluginContext to get proper typings for this.environment, this.error, etc.;
      import type { PluginContext } from 'vite' and update the type to use that symbol
      (e.g., this: PluginContext) so all load handlers using VirtualModuleLoadHandler
      gain compile-time safety while preserving behavior.
      packages/start-plugin-core/src/vite/plugins.ts (1)

      20-22: Remove the redundant .replaceAll('\\', '/') after normalizePath.

      Vite's normalizePath already normalizes all path separators to forward slashes. The additional .replaceAll call has no effect and should be removed.

      ♻️ Suggested simplification
           load() {
      -      return `import ${JSON.stringify(normalizePath(opts.getClientEntry()).replaceAll('\\', '/'))}`
      +      return `import ${JSON.stringify(normalizePath(opts.getClientEntry()))}`
           },
      🤖 Prompt for AI Agents
      Verify each finding against the current code and only fix it if needed.
      
      In `@packages/start-plugin-core/src/vite/plugins.ts` around lines 20 - 22, The
      load() function currently returns a string using
      normalizePath(opts.getClientEntry()).replaceAll('\\', '/'); remove the redundant
      .replaceAll('\\', '/') because normalizePath already converts backslashes to
      forward slashes; update the load() return expression to use only
      normalizePath(opts.getClientEntry()) and keep the JSON.stringify wrapping as-is
      so the module import path remains correct.
      🤖 Prompt for all review comments with AI agents
      Verify each finding against the current code and only fix it if needed.
      
      Inline comments:
      In `@packages/react-start-rsc/src/plugin/vite.ts`:
      - Around line 3-9: Move the inline "type" specifiers out of the mixed import and
      into a dedicated top-level type-only import: keep the runtime import for
      createVirtualModule from '@tanstack/start-plugin-core' and add a separate
      "import type { TanStackStartVitePluginCoreOptions,
      ViteRscForwardSsrResolverStrategy } from '@tanstack/start-plugin-core'". Update
      references to TanStackStartVitePluginCoreOptions and
      ViteRscForwardSsrResolverStrategy accordingly so the file no longer uses "type"
      inline specifiers in the mixed import.
      
      In `@packages/react-start/src/plugin/vite.ts`:
      - Around line 1-6: The current combined import mixes runtime values and types;
      split into a runtime import for START_ENVIRONMENT_NAMES and tanStackStartVite
      and a top-level type-only import for TanStackStartViteInputConfig and
      TanStackStartVitePluginCoreOptions to satisfy the
      import/consistent-type-specifier-style rule. Locate the import that currently
      includes START_ENVIRONMENT_NAMES, tanStackStartVite, type
      TanStackStartViteInputConfig, and type TanStackStartVitePluginCoreOptions and
      change it so runtime symbols (START_ENVIRONMENT_NAMES, tanStackStartVite) are
      imported normally and the two types are imported with an "import type" statement
      at the top level.
      
      In `@packages/solid-start/src/plugin/vite.ts`:
      - Around line 1-6: The import statement mixes value and type specifiers;
      separate the type-only imports into an `import type` clause: keep the runtime
      values START_ENVIRONMENT_NAMES and tanStackStartVite in the original import from
      '@tanstack/start-plugin-core' and move the type names
      TanStackStartViteInputConfig and TanStackStartVitePluginCoreOptions into a new
      `import type` statement so the code complies with the enforced type-specifier
      lint rule.
      
      In `@packages/start-plugin-core/src/vite/serialization-adapters-plugin.ts`:
      - Line 18: The load handler's explicit this type annotation (`load(this: {
      environment: { name: string } })`) narrows the Vite plugin context and must be
      removed; update the `load` function signature in
      `serialization-adapters-plugin.ts` to omit the `this` type (i.e., `load(...) {
      ... }`) so it uses the full Vite plugin `this` context used by
      `createVirtualModule` and `opts.load.call(this, id)`—do not replace it with a
      stricter custom type.
      
      In `@packages/vue-start/src/plugin/vite.ts`:
      - Around line 1-6: Move the two type-only imports into a top-level "import type"
      statement: keep the runtime imports (START_ENVIRONMENT_NAMES, tanStackStartVite)
      in the existing import block and move TanStackStartViteInputConfig and
      TanStackStartVitePluginCoreOptions into a separate "import type" line so the
      file imports look like runtime imports first and type imports second, satisfying
      import/consistent-type-specifier-style while preserving usage of
      START_ENVIRONMENT_NAMES and tanStackStartVite.
      
      ---
      
      Nitpick comments:
      In `@packages/start-plugin-core/src/vite/createVirtualModule.ts`:
      - Around line 4-7: Replace the unsafe this: any in the VirtualModuleLoadHandler
      type with Vite's PluginContext to get proper typings for this.environment,
      this.error, etc.; import type { PluginContext } from 'vite' and update the type
      to use that symbol (e.g., this: PluginContext) so all load handlers using
      VirtualModuleLoadHandler gain compile-time safety while preserving behavior.
      
      In `@packages/start-plugin-core/src/vite/plugins.ts`:
      - Around line 20-22: The load() function currently returns a string using
      normalizePath(opts.getClientEntry()).replaceAll('\\', '/'); remove the redundant
      .replaceAll('\\', '/') because normalizePath already converts backslashes to
      forward slashes; update the load() return expression to use only
      normalizePath(opts.getClientEntry()) and keep the JSON.stringify wrapping as-is
      so the module import path remains correct.
      
      In `@packages/start-plugin-core/tests/createVirtualModule.test.ts`:
      - Around line 1-38: Add an edge-case test in createVirtualModule.test.ts that
      ensures resolveId.handler and load.handler return undefined for non-matching
      IDs: create another test using a plugin from createVirtualModule (e.g., moduleId
      'virtual:test-module' and '#virtual:test-module') and call resolveId.handler and
      load.handler with unrelated strings (like 'other-module' and '\0other-module')
      asserting they return undefined to validate non-matching behavior.
      🪄 Autofix (Beta)

      ✅ Autofix completed


      ℹ️ Review info
      ⚙️ Run configuration

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro

      Run ID: fd152089-06da-4906-9253-954c82498789

      📥 Commits

      Reviewing files that changed from the base of the PR and between 328d7e5ebc6b8074242a07d68ccafafb83e37a0e and 5f99d56f504175fcd54bd2ab9c363e9ed7831c59.

      📒 Files selected for processing (16)
      • .changeset/rare-pigs-smash.md
      • packages/react-start-rsc/src/plugin/vite.ts
      • packages/react-start/src/plugin/vite.ts
      • packages/solid-start/src/plugin/vite.ts
      • packages/start-plugin-core/package.json
      • packages/start-plugin-core/src/index.ts
      • packages/start-plugin-core/src/vite/createVirtualModule.ts
      • packages/start-plugin-core/src/vite/dev-server-plugin/plugin.ts
      • packages/start-plugin-core/src/vite/plugin.ts
      • packages/start-plugin-core/src/vite/plugins.ts
      • packages/start-plugin-core/src/vite/serialization-adapters-plugin.ts
      • packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      • packages/start-plugin-core/src/vite/start-manifest-plugin/plugin.ts
      • packages/start-plugin-core/tests/createVirtualModule.test.ts
      • packages/start-plugin-core/tests/virtual-client-entry-plugin.test.ts
      • packages/vue-start/src/plugin/vite.ts
      💤 Files with no reviewable changes (1)
      • packages/start-plugin-core/package.json
    12. Important

      A [new CI pipeline execution](https://cloud.nx.app/cipes/69dd4e3991c7ef43d210d368) was requested that may update the conclusion below...

      Nx Cloud is proposing a fix for your failed CI:

      We fixed two ESLint violations introduced by the PR's import changes. In start-plugin-core, the newly added ../../utils and ../createVirtualModule imports were placed after ./module-specifier, violating the import/order rule — they have been reordered so parent-path imports precede sibling-path imports. In react-start-rsc, the mixed value+type import from @tanstack/start-plugin-core was split into a separate value import and a top-level import type declaration to satisfy import/consistent-type-specifier-style and sort-imports rules.

      Tip

      ✅ We verified this fix by re-running @tanstack/start-plugin-core:test:eslint, @tanstack/react-start-rsc:test:eslint.

      Suggested Fix changes
      diff --git a/packages/react-start-rsc/src/plugin/vite.ts b/packages/react-start-rsc/src/plugin/vite.ts
      index a379e71169..a43bc7531c 100644
      --- a/packages/react-start-rsc/src/plugin/vite.ts
      +++ b/packages/react-start-rsc/src/plugin/vite.ts
      @@ -1,9 +1,9 @@
       import { fileURLToPath } from 'node:url'
       import path from 'pathe'
      -import {
      -  createVirtualModule,
      -  type TanStackStartVitePluginCoreOptions,
      -  type ViteRscForwardSsrResolverStrategy,
      +import { createVirtualModule } from '@tanstack/start-plugin-core'
      +import type {
      +  TanStackStartVitePluginCoreOptions,
      +  ViteRscForwardSsrResolverStrategy,
       } from '@tanstack/start-plugin-core'
       import type { PluginOption, UserConfig } from 'vite'
       
      diff --git a/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts b/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      index d48fa65a27..de8bbea81c 100644
      --- a/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      +++ b/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      @@ -15,12 +15,12 @@ import {
       import { loadModuleForViteCompiler } from '../../start-compiler/load-module'
       import { generateServerFnResolverModule } from '../../start-compiler/server-fn-resolver-module'
       import { cleanId } from '../../start-compiler/utils'
      +import { resolveViteId } from '../../utils'
      +import { createVirtualModule } from '../createVirtualModule'
       import {
         createViteDevServerFnModuleSpecifierEncoder,
         decodeViteDevServerModuleSpecifier,
       } from './module-specifier'
      -import { createVirtualModule } from '../createVirtualModule'
      -import { resolveViteId } from '../../utils'
       import type { CompileStartFrameworkOptions } from '../../types'
       import type {
         GenerateFunctionIdFnOptional,
      

      Apply fix via Nx Cloud  Reject fix via Nx Cloud


      Or Apply changes locally with:

      npx nx-cloud apply-locally BGSz-KTYA
      Apply fix locally with your editor ↗   View interactive diff ↗

      🎓 Learn more about Self-Healing CI on [nx.dev](https://nx.dev/docs/features/ci-features/self-healing-ci?utm_source=pull-request&utm_medium=comment)
    13. codspeed[bot](GitHub profile, opens in a new tab)commented

      Merging this PR will not alter performance

      ✅ 6 untouched benchmarks


      Comparing fix-6588 (b8c884e) with main (328d7e5)[^unexpected-base] Open in CodSpeed
    14. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Note

      Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

      Fixes Applied Successfully

      Fixed 3 file(s) based on 3 unresolved review comments.

      Files modified:

      • packages/react-start-rsc/src/plugin/vite.ts
      • packages/solid-start/src/plugin/vite.ts
      • packages/vue-start/src/plugin/vite.ts

      Commit: be3b2b504489d7774ab81784d5ce58cbfeafdc94

      The changes have been pushed to the fix-6588 branch.

      Time taken: 7m 13s

    15. ♻️ Duplicate comments (1)
      packages/react-start/src/plugin/vite.ts (1)

      5-8: ⚠️ Potential issue | 🟡 Minor

      Adjust import order to satisfy import/order.

      Line 5-8 currently violates the configured import ordering rule from static analysis. Move this type import below the ./shared value import block.

      Proposed fix
       import {
         START_ENVIRONMENT_NAMES,
         tanStackStartVite,
       } from '@tanstack/start-plugin-core'
      -import type {
      -  TanStackStartViteInputConfig,
      -  TanStackStartVitePluginCoreOptions,
      -} from '@tanstack/start-plugin-core'
       import {
         configureRsc,
         reactStartRscVitePlugin,
       } from '@tanstack/react-start-rsc/plugin/vite'
       import path from 'pathe'
       import { reactStartDefaultEntryPaths, reactStartPluginDir } from './shared'
      +import type {
      +  TanStackStartViteInputConfig,
      +  TanStackStartVitePluginCoreOptions,
      +} from '@tanstack/start-plugin-core'
       import type { PluginOption } from 'vite'
      🤖 Prompt for AI Agents
      Verify each finding against the current code and only fix it if needed.
      
      In `@packages/react-start/src/plugin/vite.ts` around lines 5 - 8, Move the
      type-only import of TanStackStartViteInputConfig and
      TanStackStartVitePluginCoreOptions so it appears after the existing value import
      from './shared' to satisfy the import/order rule; locate the import statement
      currently bringing in those types and cut/paste it directly below the import
      that references './shared' (ensuring it remains a type import).
      🤖 Prompt for all review comments with AI agents
      Verify each finding against the current code and only fix it if needed.
      
      Duplicate comments:
      In `@packages/react-start/src/plugin/vite.ts`:
      - Around line 5-8: Move the type-only import of TanStackStartViteInputConfig and
      TanStackStartVitePluginCoreOptions so it appears after the existing value import
      from './shared' to satisfy the import/order rule; locate the import statement
      currently bringing in those types and cut/paste it directly below the import
      that references './shared' (ensuring it remains a type import).

      ℹ️ Review info
      ⚙️ Run configuration

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro

      Run ID: b9570a49-90e8-48fd-b09b-63abbd56abd7

      📥 Commits

      Reviewing files that changed from the base of the PR and between 5f99d56f504175fcd54bd2ab9c363e9ed7831c59 and 4a67907fa8b6f0a4cf78f6a180e5ec7ef3116060.

      📒 Files selected for processing (2)
      • packages/react-start/src/plugin/vite.ts
      • packages/start-plugin-core/src/vite/serialization-adapters-plugin.ts
    16. Nx Cloud is proposing a fix for your failed CI:

      We split the mixed value+type import from @tanstack/start-plugin-core in react-start-rsc/src/plugin/vite.ts into separate value and import type declarations, resolving import/consistent-type-specifier-style and sort-imports violations introduced by the CodeRabbit auto-fix. We also ensured the newly added ../../utils and ../createVirtualModule imports in start-compiler-plugin/plugin.ts are ordered before the ./module-specifier sibling import, satisfying the import/order rule.

      Tip

      ✅ We verified this fix by re-running @tanstack/start-plugin-core:test:eslint, @tanstack/react-start-rsc:test:eslint.

      Suggested Fix changes
      diff --git a/packages/react-start-rsc/src/plugin/vite.ts b/packages/react-start-rsc/src/plugin/vite.ts
      index a379e71169..a43bc7531c 100644
      --- a/packages/react-start-rsc/src/plugin/vite.ts
      +++ b/packages/react-start-rsc/src/plugin/vite.ts
      @@ -1,9 +1,9 @@
       import { fileURLToPath } from 'node:url'
       import path from 'pathe'
      -import {
      -  createVirtualModule,
      -  type TanStackStartVitePluginCoreOptions,
      -  type ViteRscForwardSsrResolverStrategy,
      +import { createVirtualModule } from '@tanstack/start-plugin-core'
      +import type {
      +  TanStackStartVitePluginCoreOptions,
      +  ViteRscForwardSsrResolverStrategy,
       } from '@tanstack/start-plugin-core'
       import type { PluginOption, UserConfig } from 'vite'
       
      diff --git a/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts b/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      index d48fa65a27..de8bbea81c 100644
      --- a/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      +++ b/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      @@ -15,12 +15,12 @@ import {
       import { loadModuleForViteCompiler } from '../../start-compiler/load-module'
       import { generateServerFnResolverModule } from '../../start-compiler/server-fn-resolver-module'
       import { cleanId } from '../../start-compiler/utils'
      +import { resolveViteId } from '../../utils'
      +import { createVirtualModule } from '../createVirtualModule'
       import {
         createViteDevServerFnModuleSpecifierEncoder,
         decodeViteDevServerModuleSpecifier,
       } from './module-specifier'
      -import { createVirtualModule } from '../createVirtualModule'
      -import { resolveViteId } from '../../utils'
       import type { CompileStartFrameworkOptions } from '../../types'
       import type {
         GenerateFunctionIdFnOptional,
      

      Apply fix via Nx Cloud  Reject fix via Nx Cloud


      Or Apply changes locally with:

      npx nx-cloud apply-locally 6TIk-o2Ef
      Apply fix locally with your editor ↗   View interactive diff ↗

      🎓 Learn more about Self-Healing CI on [nx.dev](https://nx.dev/docs/features/ci-features/self-healing-ci?utm_source=pull-request&utm_medium=comment)
    17. ✅ The fix from Nx Cloud was applied

      We fixed the ESLint import/order violation in start-compiler-plugin/plugin.ts that was introduced when the PR added createVirtualModule and resolveViteId imports after the existing ./module-specifier import. Moving those two imports above ./module-specifier restores the correct order (parent-directory before same-directory), resolving the lint failure.

      Tip

      ✅ We verified this fix by re-running @tanstack/start-plugin-core:test:eslint.

      Suggested Fix changes
      diff --git a/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts b/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      index d48fa65a27..7ef0cecfcd 100644
      --- a/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      +++ b/packages/start-plugin-core/src/vite/start-compiler-plugin/plugin.ts
      @@ -15,12 +15,12 @@ import {
       import { loadModuleForViteCompiler } from '../../start-compiler/load-module'
       import { generateServerFnResolverModule } from '../../start-compiler/server-fn-resolver-module'
       import { cleanId } from '../../start-compiler/utils'
      +import { createVirtualModule } from '../createVirtualModule'
      +import { resolveViteId } from '../../utils'
       import {
         createViteDevServerFnModuleSpecifierEncoder,
         decodeViteDevServerModuleSpecifier,
       } from './module-specifier'
      -import { createVirtualModule } from '../createVirtualModule'
      -import { resolveViteId } from '../../utils'
       import type { CompileStartFrameworkOptions } from '../../types'
       import type {
         GenerateFunctionIdFnOptional,
      

      Revert fix via Nx Cloud  

      View interactive diff ↗

      ➡️ This fix was applied by manuel.schiller@caligano.de

      🎓 Learn more about Self-Healing CI on [nx.dev](https://nx.dev/docs/features/ci-features/self-healing-ci?utm_source=pull-request&utm_medium=comment)

Sign in to join this conversation.