Skip to content

Build/rolldown - #3010

Merged
cexbrayat merged 1 commit into
vuejs:mainfrom
SuperDJ:build/rolldown
Nov 13, 2026
Merged

cexbrayat merged 1 commit into
vuejs:mainfrom
SuperDJ:build/rolldown

Conversation

@SuperDJ

@SuperDJ SuperDJ commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Builds on #3009.

rolldown is already installed through vite 8 and has resolve, commonjs, json and TypeScript support built in. This removes rollup, five @rollup/plugin-* packages and tslib, and with them the deepmerge advisory that has no fix.

  • rolldown.config.ts maps the rollup config one-to-one: replace values become transform.define, target stays es2015, and resolution matches @rollup/plugin-node-resolve's defaults (prefer "module", no "browser" field), so the same ESM builds of Vue are bundled
  • declarations are emitted by tsc (tsconfig.build.json) to the same dist/src/*.d.ts paths
  • createDomEvent: import KeyName as a type; rolldown transpiles files in isolation and can't tell a type-only re-export from a value
  • stubComponentsTransformer: use the result of String(value). rolldown treats an unused String() call as pure and removed the try/catch probe for objects that can't be stringified (caught by test:build)

All four bundles export the same API as before; bundles are ~20% smaller, mostly because non-legal comments are no longer kept.

@netlify

netlify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

👷 Deploy request for vue-test-utils-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 7070da3

@SuperDJ SuperDJ mentioned this pull request Nov 10, 2026
@cexbrayat

Copy link
Copy Markdown
Member

Can you rebase this one with just the commit about rolldown so I can take a look?

This is something I wanted to land, so thanks!

Bundles look similar with a 20% size reduction

@cexbrayat cexbrayat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs to be rebased and isolated to the rolldown commit to land

rolldown is already installed through vite 8 and has resolve, commonjs,
json and TypeScript support built in. This removes rollup, five
@rollup/plugin-* packages and tslib, and with them the deepmerge
advisory that has no fix.

- rolldown.config.ts maps the rollup config one-to-one: replace values
  become transform.define, target stays es2015, and resolution matches
  @rollup/plugin-node-resolve's defaults (prefer "module", no "browser"
  field), so the same ESM builds of Vue are bundled
- declarations are emitted by tsc (tsconfig.build.json) to the same
  dist/src/*.d.ts paths
- createDomEvent: import KeyName as a type; rolldown transpiles files in
  isolation and can't tell a type-only re-export from a value
- stubComponentsTransformer: use the result of String(value). rolldown
  treats an unused String() call as pure and removed the try/catch probe
  for objects that can't be stringified (caught by test:build)

All four bundles export the same API as before; bundles are ~20% smaller,
mostly because non-legal comments are no longer kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vue/test-utils@3010

commit: 7070da3

@cexbrayat cexbrayat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@cexbrayat
cexbrayat merged commit 05f5685 into vuejs:main Nov 13, 2026
5 checks passed
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.

2 participants