-
-
Notifications
You must be signed in to change notification settings - Fork 9k
build: use rolldown #14240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: minor
Are you sure you want to change the base?
build: use rolldown #14240
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates Vue's build system from Rollup/esbuild to Rolldown, a Rust-based bundler. The migration includes:
- Replacing Rollup with Rolldown for production builds
- Replacing esbuild with oxc-transform for TypeScript transpilation
- Replacing @babel/parser with oxc-parser for parsing
- Replacing @swc/core with oxc-minify for minification
- Creating new Rolldown configuration files and updating build scripts
Key Changes
- Build scripts refactored to use Rolldown API directly
- Type declaration bundling migrated to rolldown-plugin-dts
- Code adjustments for Rolldown compatibility (property initialization patterns)
Reviewed changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/dev.js | Simplified dev build using Rolldown watch API |
| scripts/build.js | Production build refactored for Rolldown API |
| scripts/build-types.js | New type declaration build using oxc-transform |
| scripts/create-rolldown-config.js | New centralized Rolldown configuration |
| scripts/inline-enums.js | Parser migration from @babel/parser to oxc-parser |
| scripts/usage-size.js | Bundle size tracking updated for Rolldown |
| rolldown.dts.config.js | DTS bundling configuration for rolldown-plugin-dts |
| packages/runtime-dom/src/apiCustomElement.ts | Property initialization moved to constructor |
| packages/compiler-sfc/src/script/context.ts | Property initialization moved to constructor |
| package.json | Dependencies updated to Rolldown ecosystem |
| .github/contributing.md | Documentation updated for new build tooling |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| console.log(`watching: ${configToUse.output.file}`) | ||
| watch(configToUse).on('event', event => { | ||
| if (event.code === 'BUNDLE_END') { | ||
| console.log(`rebuilt ${config.output.file} in ${event.duration}ms`) |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logged file path is inconsistent. When using prodConfig, the console logs configToUse.output.file but then logs config.output.file in the rebuild message. This should use configToUse.output.file consistently.
| console.log(`rebuilt ${config.output.file} in ${event.duration}ms`) | |
| console.log(`rebuilt ${configToUse.output.file} in ${event.duration}ms`) |
| const pkgDir = path.resolve(`packages/${target}`) | ||
| const pkgDir = path.resolve(__dirname, `../packages/${target}`) | ||
| await checkFileSize(`${pkgDir}/dist/${target}.global.prod.js`) | ||
| if (!formats || formats.includes('global-runtime')) { |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formats variable at line 207 may not be correctly scoped. The code references formats but it should reference the parsed formats array. Looking at line 86, formats is obtained from rawFormats?.split(','). This check should ensure formats is an array before using includes.
No description provided.