Skip to content

build: update to vite-config 0.5.x (rolldown)#6926

Merged
birkskyum merged 8 commits intomainfrom
vite-config-rolldown
Mar 15, 2026
Merged

build: update to vite-config 0.5.x (rolldown)#6926
birkskyum merged 8 commits intomainfrom
vite-config-rolldown

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Mar 15, 2026

Patched similarly to:

This upgrades the workspace build environment from rollup to rolldown.

Summary by CodeRabbit

  • Chores
    • Updated multiple @TanStack packages and developer tooling, including Vite (7.x → 8.x) and @tanstack/vite-config (0.4 → 0.5); applied patch bumps and adjusted build/module emission targets.
  • Refactor
    • Unified the Solid Router Block API into a single exported form while preserving existing behavior and compatibility.

@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2026

🦋 Changeset detected

Latest commit: 2895046

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

This PR includes changesets to release 40 packages
Name Type
@tanstack/router-devtools-core Patch
@tanstack/arktype-adapter Patch
@tanstack/eslint-plugin-router Patch
@tanstack/history Patch
@tanstack/nitro-v2-vite-plugin Patch
@tanstack/react-router Patch
@tanstack/react-router-devtools Patch
@tanstack/react-router-ssr-query Patch
@tanstack/react-start Patch
@tanstack/react-start-client Patch
@tanstack/react-start-server Patch
@tanstack/router-cli Patch
@tanstack/router-core Patch
@tanstack/router-devtools Patch
@tanstack/router-generator Patch
@tanstack/router-plugin Patch
@tanstack/router-ssr-query-core Patch
@tanstack/router-utils Patch
@tanstack/router-vite-plugin Patch
@tanstack/solid-router Patch
@tanstack/solid-router-devtools Patch
@tanstack/solid-router-ssr-query Patch
@tanstack/solid-start Patch
@tanstack/solid-start-client Patch
@tanstack/solid-start-server Patch
@tanstack/start-client-core Patch
@tanstack/start-fn-stubs Patch
@tanstack/start-plugin-core Patch
@tanstack/start-server-core Patch
@tanstack/start-static-server-functions Patch
@tanstack/start-storage-context Patch
@tanstack/valibot-adapter Patch
@tanstack/virtual-file-routes Patch
@tanstack/vue-router Patch
@tanstack/vue-router-devtools Patch
@tanstack/vue-router-ssr-query Patch
@tanstack/vue-start Patch
@tanstack/vue-start-client Patch
@tanstack/vue-start-server Patch
@tanstack/zod-adapter Patch

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 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: c327a6ab-7780-4a38-8ebd-11a0b9917849

📥 Commits

Reviewing files that changed from the base of the PR and between f3c992e and 2895046.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

Dependency and build-config bumps (TanStack packages, Vite, vite-plugin-dts), Vite config key rename from rollupOptionsrolldownOptions, @babel/core imports switched to namespace form, Block overloads consolidated into a single exported constant with a new interface, and TypeScript module target adjustments in patches.

Changes

Cohort / File(s) Summary
Changeset & Manifest
\.changeset/soft-ways-run.md, package.json
Patch bumps for multiple @tanstack packages and Vite-related deps; updated pnpm overrides and patchedDependencies mapping; build-note added for vite-config 5.x.
Vite config key changes
packages/router-devtools-core/vite.config.ts
Replaced merged.build.rollupOptions.output.* with merged.build.rolldownOptions.output.* (manualChunks, preserveModules).
Babel import style
packages/router-plugin/src/core/.../compilers.ts, packages/router-plugin/src/core/route-autoimport-plugin.ts
Swapped default @babel/core imports for namespace imports (import * as babel from '@babel/core').
API export refactor
packages/solid-router/src/useBlocker.tsx
Replaced two exported overloads of Block with a single export const Block: BlockComponent = function Block(...) and added BlockComponent interface (public signature consolidated).
Patch updates (TS module targets)
patches/@tanstack__vite-config@0.4.3.patch, patches/@tanstack__vite-config@0.5.1.patch
Adjusted TypeScript module target values and adjacent comments in source and built outputs (changes between CommonJS/NodeNext/ESNext/Node16 representations).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nudged the deps and hopped in delight,
Rolldown keys swapped in soft morning light,
Babel wears a namespace hat so neat,
Block now hops once — a single, tidy beat,
Patches tuned — the build will hum and write.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'build: update to vite-config 0.5.x (rolldown)' directly and clearly summarizes the main change: upgrading vite-config to version 0.5.x to enable Rolldown support, which is the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vite-config-rolldown
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Mar 15, 2026

View your CI Pipeline Execution ↗ for commit 2895046

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

☁️ Nx Cloud last updated this comment at 2026-03-15 22:00:05 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2026

Bundle Size Benchmarks

  • Commit: ac775f5dee67
  • Measured at: 2026-03-15T21:50:29.031Z
  • Baseline source: history:ac775f5dee67
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend
react-router.minimal 87.59 KiB +475 B (+0.53%) 275.98 KiB 76.14 KiB ▁▁▂▂▂▂▂▂▂▂▂█
react-router.full 90.63 KiB +513 B (+0.56%) 286.19 KiB 78.65 KiB ▁▁▂▂▂▂▂▂▂▂▂█
solid-router.minimal 37.12 KiB +655 B (+1.75%) 111.28 KiB 33.31 KiB ▁▁▂▂▂▂▂▂▂▂▂█
solid-router.full 41.34 KiB +556 B (+1.33%) 124.09 KiB 36.99 KiB ▁▁▂▂▂▂▂▂▂▂▂█
vue-router.minimal 52.96 KiB +633 B (+1.18%) 151.32 KiB 47.67 KiB ▁▁▂▂▂▂▂▂▂▂▂█
vue-router.full 57.67 KiB +543 B (+0.93%) 166.25 KiB 51.72 KiB ▁▁▂▂▂▂▂▂▂▂▂█
react-start.minimal 101.97 KiB +2.27 KiB (+2.27%) 323.99 KiB 88.24 KiB ▁▁▁▁▁▁▁▁▁▁▁█
react-start.full 105.32 KiB +2.30 KiB (+2.23%) 333.79 KiB 91.10 KiB ▁▁▁▁▁▁▁▁▁▁▁█
solid-start.minimal 51.22 KiB +2.42 KiB (+4.96%) 157.72 KiB 45.18 KiB ▁▁▁▁▁▁▁▁▁▁▁█
solid-start.full 56.52 KiB +2.25 KiB (+4.15%) 173.22 KiB 49.71 KiB ▁▁▁▁▁▁▁▁▁▁▁█

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 15, 2026

More templates

@tanstack/arktype-adapter

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: 2895046

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 15, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing vite-config-rolldown (2895046) with main (ac775f5)

Open in CodSpeed

@birkskyum birkskyum marked this pull request as ready for review March 15, 2026 18:44
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/soft-ways-run.md:
- Line 44: The changeset message contains a typo: replace "rooldown" with
"rolldown" in the changeset entry that reads "build: update to vite-config 5.x
(rooldown)" inside .changeset/soft-ways-run.md so the message becomes "build:
update to vite-config 5.x (rolldown)"; ensure the file is saved with the
corrected word.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9609b75e-843b-4e28-a95d-10e39ec846ba

📥 Commits

Reviewing files that changed from the base of the PR and between 91d1085 and deb2841.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .changeset/soft-ways-run.md
  • package.json
  • packages/router-devtools-core/vite.config.ts
  • packages/router-plugin/src/core/code-splitter/compilers.ts
  • packages/router-plugin/src/core/route-autoimport-plugin.ts
  • packages/solid-router/src/useBlocker.tsx
  • patches/@tanstack__vite-config@0.4.3.patch
  • patches/@tanstack__vite-config@0.5.1.patch
💤 Files with no reviewable changes (1)

@Sheraff
Copy link
Contributor

Sheraff commented Mar 15, 2026

Should we worry that this has a negative impact on both bundle size and client-side navigation? I haven't had the chance to make this same migration at work, so I don't know if this is expected or not. But i'm worried lol

@birkskyum birkskyum marked this pull request as draft March 15, 2026 18:57
@birkskyum
Copy link
Member Author

birkskyum commented Mar 15, 2026

@Sheraff I think we absolutely should worry about that.

Will set this PR to draft until we understand it better.

@birkskyum
Copy link
Member Author

birkskyum commented Mar 15, 2026

Re-running locally, i can't verify a regression, it appear to be within noise. How do we re-run the CodSpeed ?

The increase size in bundle is because of how rolldown treat CJS interop ( and react still being CJS-only, which comes at a cost )

@birkskyum birkskyum marked this pull request as ready for review March 15, 2026 20:06
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
package.json (1)

95-96: Benchmark packages pinned to Vite 7 while rest of workspace uses Vite 8.

Pinning @benchmarks/bundle-size and @benchmarks/client-nav to Vite 7.3.1 isolates benchmark results from the Vite 8 upgrade, which helps establish a consistent comparison baseline. However, this means benchmarks won't reflect the actual production build behavior with Vite 8.

Is this intended as a temporary measure until the Rolldown bundle size investigation (mentioned in PR comments) is resolved, or is there a plan to update benchmarks to Vite 8 separately?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 95 - 96, The benchmark packages
"@benchmarks/bundle-size" and "@benchmarks/client-nav" are pinned to Vite 7.3.1
while the rest of the workspace uses Vite 8; either align these entries with the
workspace Vite (update the versions to the Vite 8 range used elsewhere) or
explicitly document the temporary override: add a clear comment in package.json
(or move the pin into an overrides/notes section) explaining this is intentional
for stable benchmark baselines and include the issue/PR reference for the
Rolldown investigation so reviewers know when to remove or update the pin;
update the version string for "@benchmarks/bundle-size>vite" and
"@benchmarks/client-nav>vite" accordingly or add the comment next to those keys.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 56: The package vite-plugin-dts@4.2.3 is not guaranteed to work with Vite
8; either verify it functions under Vite 8 or migrate to unplugin-dts: in
package.json replace the vite-plugin-dts dependency with unplugin-dts (or add
it), update the Vite config where vite-plugin-dts is imported/used (search for
vite-plugin-dts in the repo) to use the unplugin-dts API (import from
'unplugin-dts/vite' and adjust options to match its config), and remove any
custom patch file that attempted to tweak module resolution so the canonical
plugin handles Vite 8 behavior; run a full dev build and type-declaration
generation to confirm compatibility and update package.json accordingly.

---

Nitpick comments:
In `@package.json`:
- Around line 95-96: The benchmark packages "@benchmarks/bundle-size" and
"@benchmarks/client-nav" are pinned to Vite 7.3.1 while the rest of the
workspace uses Vite 8; either align these entries with the workspace Vite
(update the versions to the Vite 8 range used elsewhere) or explicitly document
the temporary override: add a clear comment in package.json (or move the pin
into an overrides/notes section) explaining this is intentional for stable
benchmark baselines and include the issue/PR reference for the Rolldown
investigation so reviewers know when to remove or update the pin; update the
version string for "@benchmarks/bundle-size>vite" and
"@benchmarks/client-nav>vite" accordingly or add the comment next to those keys.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1667510b-a076-4291-8fe8-3b2dd7b8c74d

📥 Commits

Reviewing files that changed from the base of the PR and between 09d6177 and f3c992e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

@birkskyum birkskyum merged commit 838b0eb into main Mar 15, 2026
16 checks passed
@birkskyum birkskyum deleted the vite-config-rolldown branch March 15, 2026 22:39
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.

2 participants