## esbuild

Most of esbuild options are supported.

| option            | type                                  | default                                          | info                                                                                                                                                                                                                                                                                 |
| ----------------- | ------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| plugins           | array                                 |                                                  |                                                                                                                                                                                                                                                                                      |
| external          | array                                 | ["aws-sdk", "esbuild"]                           | your custom external array will be merged into the default. `aws-sdk` v2 is set as external when NodeJS version is under 18. v3 is set as external when NodeJS is >= 18. In addition in local mode [Known CommonJS](../src/lib/esbuild/knownCjs.ts) modules are added into external. |
| sourcemap         | boolean or string                     | `true` if offline mode, `false` when deploying   | overwrites the default value                                                                                                                                                                                                                                                         |
| minify            | boolean                               | `false` if offline mode, `true` when deploying   | overwrites the default value                                                                                                                                                                                                                                                         |
| outdir            | string                                | "./aws_lambda"                                   | overwrites the default value                                                                                                                                                                                                                                                         |
| outbase           | string                                | "src"                                            |                                                                                                                                                                                                                                                                                      |
| target            | string or string[]                    | based on your serverless.yml runtime declaration | overwrites the default value                                                                                                                                                                                                                                                         |
| tsconfig          | string                                |                                                  |                                                                                                                                                                                                                                                                                      |
| tsconfigRaw       | string                                |                                                  |                                                                                                                                                                                                                                                                                      |
| legalComments     | string                                |                                                  |                                                                                                                                                                                                                                                                                      |
| pure              | array                                 |                                                  |                                                                                                                                                                                                                                                                                      |
| drop              | array                                 |                                                  |                                                                                                                                                                                                                                                                                      |
| resolveExtensions | array                                 |                                                  |                                                                                                                                                                                                                                                                                      |
| ignoreAnnotations | boolean                               |                                                  |                                                                                                                                                                                                                                                                                      |
| treeShaking       | boolean                               |                                                  |                                                                                                                                                                                                                                                                                      |
| define            | object                                |                                                  |                                                                                                                                                                                                                                                                                      |
| banner            | object                                |                                                  |                                                                                                                                                                                                                                                                                      |
| footer            | object                                |                                                  |                                                                                                                                                                                                                                                                                      |
| loader            | object                                |                                                  |                                                                                                                                                                                                                                                                                      |
| assetNames        | string                                |                                                  |                                                                                                                                                                                                                                                                                      |
| entryNames        | string                                |                                                  |                                                                                                                                                                                                                                                                                      |
| publicPath        | string                                |                                                  |                                                                                                                                                                                                                                                                                      |
| inject            | array                                 |                                                  |                                                                                                                                                                                                                                                                                      |
| alias             | object                                |                                                  |                                                                                                                                                                                                                                                                                      |
| preserveSymlinks  | boolean                               |                                                  |                                                                                                                                                                                                                                                                                      |
| mainFields        | array                                 |                                                  |                                                                                                                                                                                                                                                                                      |
| nodePaths         | array                                 |                                                  |                                                                                                                                                                                                                                                                                      |
| jsx               | string                                |                                                  |                                                                                                                                                                                                                                                                                      |
| format            | string                                | cjs                                              |                                                                                                                                                                                                                                                                                      |
| keepNames         | boolean                               |                                                  |                                                                                                                                                                                                                                                                                      |
| entryPoints       | string[] or {in:string, out:string}[] | handlers paths                                   | merges with default                                                                                                                                                                                                                                                                  |
