Back to Rolldown

Plugin Hooks Generatebundle

packages/rolldown/src/plugin/docs/plugin-hooks-generatebundle.md

1.1.0517 B
Original Source

You can prevent files from being emitted by deleting them from the bundle object in this hook. To emit additional files, use the this.emitFile function.

::: danger

Do not directly add assets to the bundle. This will not work as expected as Rolldown will ignore those assets. This is not recommended in Rollup as well.

Instead, always use this.emitFile.

:::