Optional Readonlybanneresbuild --banner argument, appended as is (so it starts with the file type, e.g. :js=).
The default defines require so that CommonJS dependencies work in an ES module bundle.
Optional ReadonlyexternalsYou can mark a file or a package as external to exclude it from your build. Instead of being bundled, the import will be preserved (using require for the iife and cjs formats and using import for the esm format) and will be evaluated at run time instead.
This has several uses. First of all, it can be used to trim unnecessary code from your bundle for a code path that you know will never be executed. For example, a package may contain code that only runs in node but you will only be using that package in the browser. It can also be used to import code in node at run time from a package that cannot be bundled. For example, the fsevents package contains a native extension, which esbuild doesn't support.
Optional ReadonlyformatOutput format for the generated JavaScript files: "iife", "cjs" or "esm".
Optional ReadonlyloadersMap of file extensions (without dot) and loaders to use for this file type.
Loaders are appended to the esbuild command by --loader:.extension=loader
Optional ReadonlymainComma-separated list of package.json fields esbuild tries when resolving a package.
Optional ReadonlyminifyMinify the bundle.
Optional ReadonlyoutfileBundler output path relative to the asset's output directory.
Optional Readonlyplatformesbuild platform.
Optional ReadonlysourcemapInclude a source map in the bundle.
Optional ReadonlysourcesInclude the original source code in the source map.
Optional Readonlytargetesbuild target.
Optional ReadonlytsconfigThe path of the tsconfig.json file to use for bundling.
LambdaFunctionCodeBundle always sets this to the project's development tsconfig.
Options for bundling.