Skip to content

chore(deps): upgrade vite to 8.3.1 and repin bundled dev rolldown to 1.2.9 - #15055

Merged
stipsan merged 3 commits into
mainfrom
cody/vite-8-3-1-rolldown-pin-d480
Sep 28, 2026
Merged

stipsan merged 3 commits into
mainfrom
cody/vite-8-3-1-rolldown-pin-d480

Conversation

@stipsan

@stipsan stipsan commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Description

Vite 8.3.1 ships the requestLazy client that #14835 was waiting for, but the vite>rolldown override can't be dropped yet. Vite 8.3.1 still inlines rolldown's browser dev runtime into bundledDevClient.mjs, this time the 1.2.9 runtime, while it declares rolldown: ~1.2.9. rolldown 1.2.10 dropped the kind argument from registerFactory in both its compiler and its runtime (rolldown#10915). With rolldown 1.2.10 or 1.2.11 under Vite 8.3.1, every lazy import() and every HMR update in bundled dev mode (unstable_bundledDev) fails with TypeError: factory.fn is not a function.

So this PR moves the pin rather than removing it. Vite 8.3.1's rolldown is pinned to 1.2.9, which is the version in Vite's own v8.3.1 lockfile. The pin is scoped to vite@8.3.1 because the next Vite release serves the runtime from the installed rolldown instead (vite#23568, merged on Sept 25 but not released yet), so it stops applying once Vite is bumped. The tsdown>rolldown counter-pin is removed: Vite and tsdown now share one rolldown 1.2.9, and rolldown 1.2.8 leaves the lockfile.

Alternatives considered:

  • Remove the override entirely. A plain pnpm install keeps the locked 1.2.9 for now, but the first pnpm update rolldown or lockfile maintenance moves Vite to 1.2.11 and breaks bundled dev. CI never runs bundled dev mode, so nothing would catch it.
  • Stay on Vite 8.3.0 with rolldown 1.2.8 until the next Vite release. That works, but it keeps two rolldown copies and misses the 8.3.1 fixes.

What to review

  • pnpm-workspace.yaml: the scoped override and its removal condition.
  • pnpm-lock.yaml: Vite 8.3.0 becomes 8.3.1, Vite's rolldown goes from 1.2.8 to 1.2.9, and rolldown 1.2.8 is removed together with its bindings and @oxc-project/types@0.149.0. There are no other resolution changes.
  • AGENTS.md: a separate commit. It adds a one-line gotcha: sanity dev needs built packages because sanity.cli.ts imports sanity/cli from lib/.

Testing

I tested a standalone Vite app with experimental.bundledDev: an initial bundle, one lazy import(), and two HMR updates, run from a fresh npm install per row.

Vite rolldown under Vite Lazy import() and HMR
8.3.0 1.2.8 (main today) ok
8.3.0 1.2.9 requestLazy is not a function
8.3.1 1.2.8 ok
8.3.1 1.2.9 (this PR) ok
8.3.1 1.2.10 factory.fn is not a function
8.3.1 1.2.11 (npm default with no override) factory.fn is not a function

I then ran dev/design-studio (bundled dev) on this branch, authenticated, and drove it with Playwright:

  • With the pin (Vite 8.3.1, rolldown 1.2.9): the structure tool rendered, all 26 /@vite/lazy chunks returned 200, and an edit to CustomPane.tsx hot-updated in place with no reload. There were no page or console errors.
  • Without the override, after pnpm update rolldown (Vite resolves 1.2.11): Vite's error overlay showed factory.fn is not a function from ViteDevRuntime.initModule, and nothing rendered.

bundled_dev_vite_8_3_1_rolldown_1_2_9_lazy_load_and_hmr.mp4

Pinned: custom pane after the HMR edit
Without the override: factory.fn is not a function

Other checks that passed: pnpm install --frozen-lockfile, pnpm check:format, tsc --noEmit plus 17 unit tests for @repo/package.bundle against Vite 8.3.1, the @sanity/validation suite (247 tests), and a sample of sanity suites (176 tests). Peer-dependency warnings are the same as on main.

CI on the main merge (a942ef8faa) passes everything except E2E shard 1/4, on both chromium and firefox. That shard's one hard failure is versionStatus.spec.ts:64 (deprecated studio version), and the same test fails on main itself, which is still on Vite 8.3.0 (run for 30dcbdf90a, run for f5821c33bf). Its retries hit the studio's "Too many requests" dialog. The earlier oxlint error from #14163 is fixed on main by #15061.

Notes for release

N/A – Internal only


To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

… to 1.2.9

Vite 8.3.1 inlines rolldown 1.2.9's browser dev runtime into bundledDevClient.mjs,
while its rolldown range (~1.2.9) resolves 1.2.10+. rolldown 1.2.10 dropped the kind
argument from registerFactory (rolldown#10915), so with a newer rolldown every lazy
import() and HMR update in bundled dev mode fails with 'factory.fn is not a function'.

Pin rolldown under vite@8.3.1 to 1.2.9, the version Vite 8.3.1 was built against.
The tsdown counter-pin is no longer needed since vite and tsdown now share 1.2.9.
The next Vite release serves the runtime from the installed rolldown (vite#23568),
so the scoped override stops applying once Vite is bumped past 8.3.1.

Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 28, 2026 11:16
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
auth-test-studio Ready Ready Preview Sep 28, 2026 1:52pm UTC
page-building-studio Ready Ready Preview Sep 28, 2026 1:52pm UTC
studio-diagnostics Ready Ready Preview Sep 28, 2026 1:52pm UTC
studio-radar Ready Ready Preview Sep 28, 2026 1:52pm UTC
studio-storybook Ready Ready Preview Sep 28, 2026 1:52pm UTC
test-studio Ready Ready Preview Sep 28, 2026 1:52pm UTC
test-studio-preview-iframe Ready Ready Preview Sep 28, 2026 1:52pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle Stats — sanity

Compared against main (30dcbdf9) · v6.16.0 (npm)

sanity

Metric Value vs main (30dcbdf) vs v6.16.0
Internal (raw) 4.48 MB - +45.5 KB, +1.0%
Internal (gzip) 1.11 MB - +17.0 KB, +1.5%
Bundled (raw) 13.32 MB - +64.4 KB, +0.5%
Bundled (gzip) 3.16 MB - +21.3 KB, +0.7%
Import time 1.77s -8ms, -0.5% +32ms, +1.8%

bin:sanity

Metric Value vs main (30dcbdf) vs v6.16.0
Internal (raw) 7.1 KB - -
Internal (gzip) 2.9 KB - -
Bundled (raw) 7.1 KB - -
Bundled (gzip) 2.8 KB - -
Import time 5ms -0ms, -0.8% +0ms, +2.8%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The bundled-dev runtime and HMR verification listed in the testing section remains incomplete.

Review effort: Balanced
Findings: None

What changed in this PR

Upgrades Vite to 8.3.1 while preserving bundled-dev compatibility with Rolldown.

Changes:

  • Updates Vite from 8.3.0 to 8.3.1.
  • Pins Vite 8.3.1 specifically to Rolldown 1.2.9.
  • Removes obsolete Rolldown 1.2.8 resolutions.
File Description
pnpm-workspace.yaml Updates the catalog and scopes the Rolldown compatibility override.
pnpm-lock.yaml Resolves Vite and all Rolldown consumers consistently.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 50.08% 40690 / 81239
🔵 Statements 45.36% 54086 / 119211
🔵 Functions 45.48% 8323 / 18299
🔵 Branches 40.39% 31250 / 77369
File CoverageNo changed files found.
Generated in workflow #72372 for commit a942ef8 by the Vitest Coverage Report Action

The CLI loads sanity.cli.ts without the monorepo export condition, so its
sanity/cli import needs packages/sanity/lib/cli.js even though the studio
sources themselves resolve from src/.

Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused dependency update, scoped override, lockfile, upstream references, and verification results are internally consistent.

Review effort: Balanced
Findings: None

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

@stipsan
stipsan marked this pull request as ready for review September 28, 2026 13:20
@stipsan
stipsan requested a review from a team as a code owner September 28, 2026 13:20
@stipsan
stipsan requested review from juice49 and removed request for a team September 28, 2026 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The scoped override, generated lockfile, upstream compatibility details, and documentation are consistent and well verified.

Review effort: Balanced
Findings: None

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

stipsan added a commit to sanity-io/plugins that referenced this pull request Sep 28, 2026
…2.9 (#2034)

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
### Description

Ports
[sanity-io/sanity#15055](sanity-io/sanity#15055)
to this repo. `dev/test-studio` runs `sanity dev` with
`unstable_bundledDev: true`, so it has the same exposure.

Vite 8.3.1 inlines rolldown 1.2.9's browser dev runtime into
`bundledDevClient.mjs`, but declares `rolldown: ~1.2.9`. rolldown 1.2.10
dropped the `kind` argument from `registerFactory`
([rolldown#10915](rolldown/rolldown#10915)).
With rolldown 1.2.10 or 1.2.11 under Vite 8.3.1, every lazy `import()`
and HMR update in bundled dev fails with `TypeError: factory.fn is not a
function`.

This PR bumps Vite from 8.2.2 to 8.3.1 and adds a `vite@8.3.1>rolldown:
1.2.9` override. The pin is scoped to 8.3.1 because the next Vite
release serves the runtime from the installed rolldown
([vite#23568](vitejs/vite#23568)). Delete it
when bumping past 8.3.1.

_Testing in progress; description will be updated with results._
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-8a49abed-56bd-47f4-9e16-fbcde27d80eb?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-8a49abed-56bd-47f4-9e16-fbcde27d80eb&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
@stipsan
stipsan merged commit eb9aba6 into main Sep 28, 2026
103 of 108 checks passed
@stipsan
stipsan deleted the cody/vite-8-3-1-rolldown-pin-d480 branch September 28, 2026 16:32

This branch was successfully deployed

7 active deployments
Preview – studio-storybook — a942ef8f Deployed Sep 28, 2026 by vercel[bot]
Preview – studio-diagnostics — a942ef8f Deployed Sep 28, 2026 by vercel[bot]
Preview – test-studio — a942ef8f Deployed Sep 28, 2026 by vercel[bot]
Preview – page-building-studio — a942ef8f Deployed Sep 28, 2026 by vercel[bot]
Preview – auth-test-studio — a942ef8f Deployed Sep 28, 2026 by vercel[bot]
Preview – studio-radar — a942ef8f Deployed Sep 28, 2026 by vercel[bot]
Preview – test-studio-preview-iframe — a942ef8f Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants