Skip to content

Conversation

XGHeaven
Copy link
Collaborator

@XGHeaven XGHeaven commented Sep 5, 2025

No description provided.

@XGHeaven XGHeaven requested a review from Copilot September 5, 2025 04:05
Copy link

@Copilot Copilot AI left a 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.

Comment on lines +206 to +210
return {
taskName: context.buildTask.name,
// TODO: correct type and value
outputs: bundle.output as any,
outputFiles: bundle.output as any,
Copy link
Preview

Copilot AI Sep 5, 2025

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.

Suggested change
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,

Copilot uses AI. Check for mistakes.

@XGHeaven XGHeaven mentioned this pull request Sep 2, 2025
28 tasks
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.

1 participant