Skip to content

Commit

Permalink
spread options instead
Browse files Browse the repository at this point in the history
  • Loading branch information
finnholland committed Oct 24, 2024
1 parent 75ae0ca commit 9990d1f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/esbuild/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ export class Esbuild implements ILocalBundling {

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

Expand Down

0 comments on commit 9990d1f

Please sign in to comment.