Class: RolldownBuild
Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1107
The bundle object returned by rolldown function.
Accessors
closed
Get Signature
get closed(): boolean;Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1118
Whether the bundle has been closed.
If the bundle is closed, calling other methods will throw an error.
Returns
boolean
Methods
close()
close(): Promise<void>;Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1156
Close the bundle and free resources.
This method is called automatically when using using syntax.
Returns
Promise<void>
Example
import { rolldown } from 'rolldown'
{
using bundle = await rolldown({ input: 'src/main.js' })
const output = await bundle.generate({ format: 'esm' })
console.log(output)
// bundle.close() is called automatically here
}generate()
generate(outputOptions?): Promise<RolldownOutput>;Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1128
Generate bundles in-memory.
If you directly want to write bundles to disk, use the write method instead.
Parameters
outputOptions?
The output options.
Returns
Promise<RolldownOutput>
The generated bundle.
Throws
RolldownError When an error occurs during the build.
write()
write(outputOptions?): Promise<RolldownOutput>;Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1138
Generate and write bundles to disk.
If you want to generate bundles in-memory, use the generate method instead.
Parameters
outputOptions?
The output options.
Returns
Promise<RolldownOutput>
The generated bundle.
Throws
RolldownError When an error occurs during the build.