Skip to content

feat: update rolldown to 1.1.1#22593

Merged
sapphi-red merged 12 commits into
mainfrom
06-03-feat_update_rolldown
Jun 11, 2026
Merged

feat: update rolldown to 1.1.1#22593
sapphi-red merged 12 commits into
mainfrom
06-03-feat_update_rolldown

Conversation

@shulaoda

@shulaoda shulaoda commented Jun 3, 2026

Copy link
Copy Markdown
Member

@shulaoda

shulaoda commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@shulaoda shulaoda force-pushed the 06-03-feat_update_rolldown branch 2 times, most recently from bf257fe to f2b589f Compare June 3, 2026 11:50
@pkg-pr-new

pkg-pr-new Bot commented Jun 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/plugin-legacy

pnpm add https://pkg.pr.new/@vitejs/plugin-legacy@22593 -D
npm i https://pkg.pr.new/@vitejs/plugin-legacy@22593 -D
yarn add https://pkg.pr.new/@vitejs/plugin-legacy@22593.tgz -D

vite

pnpm add https://pkg.pr.new/vite@22593 -D
npm i https://pkg.pr.new/vite@22593 -D
yarn add https://pkg.pr.new/vite@22593.tgz -D

commit: 92c759c

@shulaoda

This comment was marked as outdated.

@vite-ecosystem-ci

This comment was marked as outdated.

@shulaoda shulaoda force-pushed the 06-03-feat_update_rolldown branch from f2b589f to 2d687ed Compare June 3, 2026 15:12
@shulaoda shulaoda changed the title feat: update rolldown feat: update rolldown to 1.1.0 Jun 3, 2026
@shulaoda shulaoda marked this pull request as ready for review June 3, 2026 15:13
@shulaoda

This comment was marked as outdated.

@shulaoda shulaoda requested a review from sapphi-red June 3, 2026 15:13
@vite-ecosystem-ci

This comment was marked as outdated.

@sapphi-red

Copy link
Copy Markdown
Member

@shulaoda It seems the failure of vite-plugin-react is an actual one. I get Uncaught ReferenceError: withEmotionCache$1 is not defined in the react-emotion playground.

@shulaoda

shulaoda commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

@shulaoda It seems the failure of vite-plugin-react is an actual one. I get Uncaught ReferenceError: withEmotionCache$1 is not defined in the react-emotion playground.

Okay, let me investigate this. If necessary, I'll urgently release a patch version.

@shulaoda

shulaoda commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

Comment thread package.json Outdated
Comment thread packages/vite/package.json Outdated
@vite-ecosystem-ci

This comment was marked as outdated.

@sapphi-red

Copy link
Copy Markdown
Member

The plugin-react failure seems to be fixed. But it seems analog is still failing and vike and plugin-rsc started to fail.

@shulaoda

shulaoda commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@vite-ecosystem-ci

This comment was marked as outdated.

@shulaoda

shulaoda commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@vite-ecosystem-ci

This comment was marked as outdated.

@shulaoda

shulaoda commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

The plugin-react failure seems to be fixed. But it seems analog is still failing and vike and plugin-rsc started to fail.

The plugin-rsc ecosystem-ci failure is caused by rolldown/rolldown#9419, which renamed the standalone runtime chunk from rolldown-runtime-[hash].js to a generic chunk-[hash].js, so examples/basic's assertion that filters the runtime out by name (!f.includes('rolldown-runtime')) no longer matches and wrongly sees lib-react as having a non-runtime import.

shulaoda added a commit to rolldown/rolldown that referenced this pull request Jun 9, 2026
…unter (#9672)

### Background

Surfaced downstream as vitejs/vite#22593 — `@emotion/react` breaks under Vite's dependency pre-bundling once `experimental.lazyBarrel` is the default: `@emotion/react` imports `withEmotionCache` for local use and also re-exports it, and `@emotion/styled` imports only the re-export, producing `ReferenceError: withEmotionCache$1 is not defined`. The minimal repro below is that pattern reduced.

### Repro

```
m.js        export function x(){...}  export function y(){...}
barrel.js   import { x } from './m'   // record#0: local use, in useX()
            export { y } from './m'   // a re-export
            export function useX(){ return x() }
consumer.js export { y } from './barrel'   // requests ONLY the re-export y
splitter.js export { y } from './m'        // makes m its own chunk
```

`useX()` → `ReferenceError: x is not defined`.

### Problem

`barrel` is a barrel and a user entry. `consumer` requests only its re-export `y`, so `barrel` is processed with `Partial({ y })` → `has_local_export` is false → lazy barrel **defers `barrel`'s own `import { x }` record** (`resolved_module = None`). But `barrel` is an entry, so its body is still emitted and uses `x` — which was never imported → dangling reference.

An entry must keep all its exports, so it should request `All` and load every record. That recovery existed but only in the `Some(VisitState::Seen)` branch; a first-time entry registration goes through the `None` branch and skips it. (Order-sensitive, hence intermittent — if an importer registered the module first, the entry add hit `Seen` and it worked.)

### Flow

1. `barrel` registered as entry (first encounter, `None` arm) → recovery skipped.
2. `consumer` imports `y` → records `Partial({ y })` on `barrel`.
3. `barrel` initializes → `take_needed_records(Partial({ y }))`, `has_local_export = false` → `import { x }` record deferred, never resolved.
4. binder skips the unresolved record → `useX`'s `x` unbound → emitted barrel references an undefined `x`.
@vite-ecosystem-ci

This comment was marked as outdated.

@shulaoda shulaoda force-pushed the 06-03-feat_update_rolldown branch from 74225d9 to 5399e8d Compare June 10, 2026 10:18
@shulaoda

This comment was marked as outdated.

@vite-ecosystem-ci

This comment was marked as outdated.

@shulaoda shulaoda force-pushed the 06-03-feat_update_rolldown branch from a4b39d6 to c491b50 Compare June 11, 2026 08:16
@shulaoda

This comment was marked as outdated.

@vite-ecosystem-ci

This comment was marked as outdated.

@shulaoda

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@shulaoda shulaoda changed the title feat: update rolldown to 1.1.0 feat: update rolldown to 1.1.1 Jun 11, 2026
@vite-ecosystem-ci

Copy link
Copy Markdown

📝 Ran ecosystem CI on a02e7ed: Open

suite result latest scheduled
storybook failure success
react-router failure failure
analogjs failure success
module-federation failure success
astro failure failure
marko success failure
waku failure success
tanstack-start failure failure
vite-plugin-react failure success
vite-plugin-cloudflare failure failure
vitest failure failure
vite-plugin-rsc failure success

nuxt, quasar, vite-environment-examples, laravel, qwik, sveltekit, vike, vite-plugin-svelte, vite-plugin-pwa, vuepress, unocss, vite-plugin-vue, vitepress, vite-setup-catalogue

@shulaoda

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@sapphi-red sapphi-red linked an issue Jun 11, 2026 that may be closed by this pull request
7 tasks
Comment thread package.json Outdated
Co-authored-by: 翠 <green@sapphi.red>
@vite-ecosystem-ci

Copy link
Copy Markdown

📝 Ran ecosystem CI on a02e7ed: Open

suite result latest scheduled
marko success failure
analogjs failure success
react-router failure failure
astro failure failure
vitest success failure
tanstack-start failure failure
vite-plugin-cloudflare failure failure

qwik, sveltekit, quasar, storybook, unocss, vite-plugin-pwa, vike, laravel, nuxt, vite-environment-examples, vite-plugin-vue, vite-plugin-svelte, vite-setup-catalogue, vitepress, vite-plugin-rsc, vite-plugin-react, module-federation, vuepress, waku

@sapphi-red sapphi-red added the p3-significant High priority enhancement (priority) label Jun 11, 2026
@sapphi-red sapphi-red merged commit 8a13d63 into main Jun 11, 2026
31 of 32 checks passed
@sapphi-red sapphi-red deleted the 06-03-feat_update_rolldown branch June 11, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment