in aws_lambda_builders/workflows/nodejs_npm_esbuild/esbuild.py [0:0]
def build_default_values(self) -> "EsbuildCommandBuilder":
"""
Build the default values that each call to esbuild should contain
:rtype: EsbuildCommandBuilder
:return: An instance of the command builder
"""
args = ["--bundle", "--platform=node", "--outdir={}".format(self._artifacts_dir)]
if "target" not in self._bundler_config:
args.append("--target=es2020")
if "format" not in self._bundler_config:
args.append("--format=cjs")
if "minify" not in self._bundler_config:
args.append("--minify")
LOG.debug("Using the following default args: %s", str(args))
self._command.extend(args)
return self