@Stability(value=Experimental) public static final class BundlingOptions.Builder extends Object implements software.amazon.jsii.Builder<BundlingOptions>
BundlingOptions| Constructor and Description |
|---|
Builder() |
@Stability(value=Experimental) public BundlingOptions.Builder buildArgs(Map<String,String> buildArgs)
BundlingOptions.getBuildArgs()buildArgs - Build arguments to pass when building the bundling image.this@Stability(value=Experimental) public BundlingOptions.Builder bundlingDockerImage(BundlingDockerImage bundlingDockerImage)
BundlingOptions.getBundlingDockerImage()bundlingDockerImage - A custom bundling Docker image.
This image should have esbuild installed globally. If you plan to use nodeModules
it should also have npm or yarn depending on the lock file you're using.
See https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/Dockerfile for the default image provided by @aws-cdk/aws-lambda-nodejs.
this@Stability(value=Experimental) public BundlingOptions.Builder bundlingEnvironment(Map<String,String> bundlingEnvironment)
BundlingOptions.getBundlingEnvironment()bundlingEnvironment - Environment variables defined when bundling runs.this@Stability(value=Experimental) public BundlingOptions.Builder esbuildVersion(String esbuildVersion)
BundlingOptions.getEsbuildVersion()esbuildVersion - The version of esbuild to use when running in a Docker container.this@Stability(value=Experimental) public BundlingOptions.Builder externalModules(List<String> externalModules)
BundlingOptions.getExternalModules()externalModules - A list of modules that should be considered as externals (already available in the runtime).this@Stability(value=Experimental) public BundlingOptions.Builder forceDockerBundling(Boolean forceDockerBundling)
BundlingOptions.getForceDockerBundling()forceDockerBundling - Force bundling in a Docker container even if local bundling is possible.
This is useful if your function relies on node modules
that should be installed (nodeModules) in a Lambda compatible
environment.this@Stability(value=Experimental) public BundlingOptions.Builder loader(Map<String,String> loader)
BundlingOptions.getLoader()loader - Use loaders to change how a given input file is interpreted.
Configuring a loader for a given file type lets you load that file type with
an import statement or a require call.this@Stability(value=Experimental) public BundlingOptions.Builder minify(Boolean minify)
BundlingOptions.getMinify()minify - Whether to minify files when bundling.this@Stability(value=Experimental) public BundlingOptions.Builder nodeModules(List<String> nodeModules)
BundlingOptions.getNodeModules()nodeModules - A list of modules that should be installed instead of bundled.
Modules are
installed in a Lambda compatible environnment only when bundling runs in
Docker.this@Stability(value=Experimental) public BundlingOptions.Builder sourceMap(Boolean sourceMap)
BundlingOptions.getSourceMap()sourceMap - Whether to include source maps when bundling.this@Stability(value=Experimental) public BundlingOptions.Builder target(String target)
BundlingOptions.getTarget()target - Target environment for the generated JavaScript code.this@Stability(value=Experimental) public BundlingOptions build()
build in interface software.amazon.jsii.Builder<BundlingOptions>BundlingOptionsNullPointerException - if any required attribute was not providedCopyright © 2020. All rights reserved.