Skip to content
Source
Sign inSign up
TanStack/router

fix: prevent HMR to throw error about entrypoints #5317

Mergedschiller-manuel(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5317/headmerged by schiller-manuel(GitHub profile, opens in a new tab)

fixes #5277

Summary by CodeRabbit

  • Refactor
    • Updated internal identifiers for client and server entry points to use virtual module identifiers.
    • No changes required for existing projects; behavior remains the same during development and build.
    • This adjustment is internal and does not alter public APIs or user workflows.
    1. Walkthrough

      Updated client and server entry point identifiers in packages/start-plugin-core/src/constants.ts from internal placeholders to virtual module identifiers, modifying how aliases resolve for these entry points.

      Changes

      Cohort / File(s)Summary
      Plugin core constants
      packages/start-plugin-core/src/constants.ts
      Changed ENTRY_POINTS.client from 'tanstack-start-client-entry' to 'virtual:tanstack-start-client-entry' and ENTRY_POINTS.server from 'tanstack-start-server-entry' to 'virtual:tanstack-start-server-entry'.

      Estimated code review effort

      🎯 2 (Simple) | ⏱️ ~10 minutes

      Poem

      I twitch my ears at virtual dawn, New paths hop in, old aliases gone. A nibble of code, a brighter trail— Hot reload hums, no squeaks, no wail. In burrows of build, I softly cheer: “Map the entries; the route is clear!” 🐇✨

      Pre-merge checks and finishing touches

      ✅ Passed checks (5 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title Check✅ PassedThe title succinctly describes the primary change—preventing HMR from throwing errors about entrypoints—directly reflecting the modification of entrypoint identifiers to fix hot reload failures related to entrypoints. It is concise, specific to the key issue, and clearly summarizes the intent of the changeset.
      Linked Issues Check✅ PassedThe pull request updates ENTRY_POINTS.client and ENTRY_POINTS.server values to virtual module identifiers, which directly addresses the alias resolution errors on hot reload described in issue #5277 by ensuring that entrypoints are correctly recognized during HMR and preventing the terminal errors outlined in the linked issue.
      Out of Scope Changes Check✅ PassedAll modifications are confined to the constants.ts file, specifically adjusting the client and server entrypoint identifiers to resolve HMR errors, and no unrelated files or features have been altered beyond the scope defined by issue #5277.
      Docstring Coverage✅ PassedNo functions found in the changes. Docstring coverage check skipped.
      ✨ Finishing touches
      • 📝 Generate Docstrings
        🧪 Generate unit tests
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `fix-5277`

      📜 Recent review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between af388a89f783b158f5725056192a278dde3155f8 and fe6350ac4a0fff0f9027782d43de34aab8496394.

      📒 Files selected for processing (1)
      • packages/start-plugin-core/src/constants.ts (1 hunks)
      🧰 Additional context used
      📓 Path-based instructions (2)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use TypeScript in strict mode with extensive type safety across the codebase

      Files:

      • packages/start-plugin-core/src/constants.ts
      packages/{*-start,start-*}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Name and place Start framework packages under packages/-start/ or packages/start-/

      Files:

      • packages/start-plugin-core/src/constants.ts
      ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
      • GitHub Check: Test
      • GitHub Check: Preview
      🔇 Additional comments (1)
      packages/start-plugin-core/src/constants.ts (1)

      15-16: Approve update to virtual module entry points

      No legacy references to __tanstack-start-client-entry__ or __tanstack-start-server-entry__ remain in the codebase.


      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-plugin-core

    3. View your CI Pipeline Execution ↗ for commit fe6350ac4a0fff0f9027782d43de34aab8496394

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded4m 49sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 21sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-09-30 22:40:39 UTC

    4. More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5317

      @tanstack/directive-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5317

      @tanstack/eslint-plugin-router

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

      @tanstack/history

      npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5317

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5317

      @tanstack/react-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5317

      @tanstack/react-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5317

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5317

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5317

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5317

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5317

      @tanstack/start-client-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5317

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5317

      @tanstack/start-server-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5317

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5317

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5317

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5317

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5317

      commit: fe6350a

Sign in to join this conversation.