Skip to content

Commit

Permalink
Overwrite props if provided otherwise default
Browse files Browse the repository at this point in the history
  • Loading branch information
finnholland committed Oct 24, 2024
1 parent e078f01 commit 75ae0ca
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/esbuild/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ export class Esbuild implements ILocalBundling {

// Override with default options
Object.assign(this.options, {
logLevel: "info",
sourcemap: false,
bundle: true,
minify: true,
platform: "node",
logLevel: options.logLevel ?? "info",
sourcemap: options.sourcemap ?? false,
bundle: options.bundle ?? true,
minify: options.minify ?? true,
platform: options.platform ?? "node",
// Do not minify identifiers, otherwise the exported `handler` function name gets minified failing to start
// the lambda
minifyIdentifiers: false,
minifyWhitespace: true,
minifySyntax: true,
minifyWhitespace: options.minifyWhitespace ?? true,
minifySyntax: options.minifySyntax ?? true,
});
}

Expand Down

0 comments on commit 75ae0ca

Please sign in to comment.