Skip to content

Commit

Permalink
fix(packages/core): make outputOptions optional (#223)
Browse files Browse the repository at this point in the history
<!-- Thank you for contributing! -->

### Description

<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->

### Test Plan

<!-- e.g. is there anything you'd like reviewers to focus on? -->

---
  • Loading branch information
hyf0 committed Nov 11, 2023
1 parent 4e1065a commit b2439b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/rolldown-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ export class RolldownBuild implements RollupBuild {
closed = false

// @ts-expect-error 2416
async generate(outputOptions: OutputOptions): Promise<RollupOutput> {
async generate(outputOptions: OutputOptions = {}): Promise<RollupOutput> {
const bindingOptions = normalizeOutputOptions(outputOptions)
const output = await this.#bundler.write(bindingOptions)
return transformToRollupOutput(output)
}

// @ts-expect-error 2416
async write(outputOptions: OutputOptions): Promise<RollupOutput> {
async write(outputOptions?: OutputOptions = {}): Promise<RollupOutput> {
const bindingOptions = normalizeOutputOptions(outputOptions)
const output = await this.#bundler.write(bindingOptions)
return transformToRollupOutput(output)
Expand Down

0 comments on commit b2439b1

Please sign in to comment.