From 7fc2d496774db491f6e56c774db26caa8d55ce4e Mon Sep 17 00:00:00 2001 From: finnholland <65142636+finnholland@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:05:49 +1030 Subject: [PATCH] spread options instead --- packages/esbuild/esbuild.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/esbuild/esbuild.ts b/packages/esbuild/esbuild.ts index f4c78b11..3e3a7bfd 100644 --- a/packages/esbuild/esbuild.ts +++ b/packages/esbuild/esbuild.ts @@ -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, }); }