Skip to content

Compat generateBundle writeBundle to rollup.  #820

@underfin

Description

@underfin

The generateBundle type should be

(options: OutputOptions, bundle: OutputBundle, isWrite: boolean) => void

The writeBundle type should be

(options: OutputOptions, bundle: OutputBundle) => void

Current implementation is not correct at now, see https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/plugin/bindingify-output-hooks.ts#L6-L29.

Here already has a util convert BindingOutputsto OutputBundle. See https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/utils/transform-to-rollup-output.ts#L67-L71.

The test should be enabled at https://github.com/rolldown/rolldown/blob/main/packages/rolldown/tests/fixtures/plugin/generate-bundle/_config.ts#L11 and https://github.com/rolldown/rolldown/blob/main/packages/rolldown/tests/fixtures/plugin/write-bundle/_config.ts#L11. You should also add test outputOption assert.

Metadata

Metadata

Assignees

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions