Skip to content

fix(start): explicitly re-export public API to survive SSR cold-start cycle#7466

Merged
schiller-manuel merged 1 commit into
mainfrom
reexport-vite-workaround
May 21, 2026
Merged

fix(start): explicitly re-export public API to survive SSR cold-start cycle#7466
schiller-manuel merged 1 commit into
mainfrom
reexport-vite-workaround

Conversation

@schiller-manuel
Copy link
Copy Markdown
Collaborator

@schiller-manuel schiller-manuel commented May 21, 2026

see #7459

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where certain public API functions were unavailable during server-side rendering and link-time execution in React Start, Solid Start, and Vue Start. These packages now properly expose all public functions from the core library throughout the complete application lifecycle.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af2e48fd-24cf-47b4-891e-3dc3a8df1b78

📥 Commits

Reviewing files that changed from the base of the PR and between e2896b5 and f3d8afb.

📒 Files selected for processing (4)
  • .changeset/trim-start-meta-reexports.md
  • packages/react-start/src/index.ts
  • packages/solid-start/src/index.ts
  • packages/vue-start/src/index.ts

📝 Walkthrough

Walkthrough

This PR adds explicit named re-exports from @tanstack/start-client-core to three framework-specific start packages (React, Solid, Vue) alongside existing barrel exports. These explicit re-exports ensure public API names are registered on the namespace at link time and persist through SSR cold-start cycles, resolving runtime availability issues.

Changes

SSR Namespace Visibility Fix

Layer / File(s) Summary
Changeset documentation
.changeset/trim-start-meta-reexports.md
Documents patch-level version bumps and explains that explicit re-exports of selected public API names from @tanstack/start-client-core are now added to react-start, solid-start, and vue-start to fix SSR namespace visibility.
Framework-specific re-exports
packages/react-start/src/index.ts, packages/solid-start/src/index.ts, packages/vue-start/src/index.ts
Explicit named re-exports of createClientOnlyFn, createCsrfMiddleware, createIsomorphicFn, createMiddleware, createServerFn, createServerOnlyFn, and createStart added to each package's index to ensure these API names are registered at link time and accessible throughout the SSR execution cycle.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 With re-exports now in place so bright,
The SSR cold-start sees functions alight,
No more missing middleware at runtime's dawn,
Three frameworks together, the facade lives on!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: explicitly re-exporting public APIs to fix SSR cold-start issues, which aligns with all file changes across react-start, solid-start, and vue-start packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 reexport-vite-workaround

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

  • Commit: 033682b2d6e5
  • Measured at: 2026-05-21T20:34:05.174Z
  • Baseline source: history:65b4abe65bc2
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Initial gzip Raw Brotli Trend
react-router.minimal 87.30 KiB 0 B (0.00%) 87.16 KiB 274.02 KiB 75.93 KiB ███████▁▁▁▁
react-router.full 90.82 KiB 0 B (0.00%) 90.68 KiB 285.51 KiB 78.89 KiB ▆▆▆▆▆▆█▁▁▁▁
solid-router.minimal 35.53 KiB 0 B (0.00%) 35.41 KiB 106.33 KiB 31.98 KiB ▅▅▅████▁▁▁▁
solid-router.full 40.27 KiB 0 B (0.00%) 40.15 KiB 120.52 KiB 36.23 KiB ▁▁▁▂▂▂▅████
vue-router.minimal 53.32 KiB 0 B (0.00%) 53.20 KiB 151.46 KiB 47.92 KiB ██████▁▆▆▆▆
vue-router.full 58.45 KiB 0 B (0.00%) 58.32 KiB 167.62 KiB 52.37 KiB ██████▁████
react-start.minimal 102.02 KiB 0 B (0.00%) 101.89 KiB 322.47 KiB 88.26 KiB ▁▁▁▅▅▅▄████
react-start.deferred-hydration 103.07 KiB 0 B (0.00%) 102.19 KiB 324.11 KiB 89.26 KiB ████▁▁▁▁
react-start.full 105.42 KiB 0 B (0.00%) 105.28 KiB 332.78 KiB 91.04 KiB ▆▆▆████▁▁▁▁
react-start.rsbuild.minimal 99.64 KiB 0 B (0.00%) 99.46 KiB 316.93 KiB 85.78 KiB ▆▆▆▆▆▆▁████
react-start.rsbuild.full 102.93 KiB 0 B (0.00%) 102.76 KiB 327.34 KiB 88.52 KiB ██████▁▃▃▃▃
solid-start.minimal 49.67 KiB 0 B (0.00%) 49.54 KiB 152.45 KiB 43.83 KiB ▁▁▁███▇▄▄▄▄
solid-start.deferred-hydration 53.74 KiB 0 B (0.00%) 50.40 KiB 160.99 KiB 47.75 KiB ███▇▁▁▁▁
solid-start.full 55.46 KiB 0 B (0.00%) 55.33 KiB 169.34 KiB 48.83 KiB ▁▁▁███▆▆▆▆▆

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.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 21, 2026

View your CI Pipeline Execution ↗ for commit f3d8afb

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 10m 3s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2m 15s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-21 20:50:34 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

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

🟩 Patch bumps

Package Version Reason
@tanstack/react-start 1.168.9 → 1.168.10 Changeset
@tanstack/solid-start 1.168.9 → 1.168.10 Changeset
@tanstack/vue-start 1.168.9 → 1.168.10 Changeset

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 21, 2026

More templates

@tanstack/arktype-adapter

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

@tanstack/eslint-plugin-router

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

@tanstack/eslint-plugin-start

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-rsc

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: f3d8afb

@schiller-manuel schiller-manuel merged commit ce61fa2 into main May 21, 2026
19 checks passed
@schiller-manuel schiller-manuel deleted the reexport-vite-workaround branch May 21, 2026 20:53
@github-actions github-actions Bot mentioned this pull request May 21, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 21, 2026

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing reexport-vite-workaround (f3d8afb) with main (65b4abe)2

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

  2. No successful run was found on main (e2896b5) during the generation of this report, so 65b4abe was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions github-actions Bot mentioned this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant