-
Notifications
You must be signed in to change notification settings - Fork 75
feat: support rolldown as an experimental engine #688
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: next
Are you sure you want to change the base?
Conversation
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 adds experimental support for Rolldown as a new bundling engine alongside the existing Rollup and RSLib engines. The implementation includes engine detection, Rolldown-specific configuration options, and comprehensive test coverage.
- Add Rolldown as a new engine type with full configuration support
- Implement Rolldown bundling functionality with shared utilities from Rollup
- Add comprehensive integration tests for React components using Rolldown
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/pkg/src/types.ts | Add 'rolldown' to EngineType union |
| packages/pkg/src/tasks/bundle.ts | Implement Rolldown build handling and fix bundle.write binding |
| packages/pkg/src/engine/rolldown/options.ts | New Rolldown options configuration using shared Rollup utilities |
| packages/pkg/src/engine/rollup/options.ts | Export shared utilities for use by Rolldown |
| packages/pkg/src/helpers/taskConfig.ts | Add bundle task assertion helper |
| packages/pkg/package.json | Add rolldown dependency |
| tests/helpers/run.ts | Fix test cleanup order and use serialize-javascript for config |
| tests/integration/react/* | Add React integration tests with Rolldown support |
| tests/integration/default/index.test.ts | Add Rolldown bundle test case |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| return { | ||
| taskName: context.buildTask.name, | ||
| // TODO: correct type and value | ||
| outputs: bundle.output as any, | ||
| outputFiles: bundle.output as any, |
Copilot
AI
Sep 5, 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 TODO comment indicates incomplete implementation. The bundle.output should be properly typed and transformed to match the expected OutputResult interface instead of using any type assertions.
| return { | |
| taskName: context.buildTask.name, | |
| // TODO: correct type and value | |
| outputs: bundle.output as any, | |
| outputFiles: bundle.output as any, | |
| // Transform bundle.output to match OutputResult | |
| const outputs = Array.isArray(bundle.output) | |
| ? bundle.output.filter((item) => item.type === 'chunk') | |
| : []; | |
| const outputFiles = Array.isArray(bundle.output) | |
| ? bundle.output.filter((item) => item.type === 'asset') | |
| : []; | |
| return { | |
| taskName: context.buildTask.name, | |
| outputs, | |
| outputFiles, |
c78e47c to
358f4cb
Compare
No description provided.