@Stability(value=Experimental) @Internal public static final class BundlingOptions.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements BundlingOptions
BundlingOptionssoftware.amazon.jsii.JsiiObject.InitializationModeBundlingOptions.Builder, BundlingOptions.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
protected |
Jsii$Proxy(Map<String,String> buildArgs,
ICommandHooks commandHooks,
BundlingDockerImage dockerImage,
Map<String,String> environment,
String esbuildVersion,
List<String> externalModules,
Boolean forceDockerBundling,
Boolean keepNames,
Map<String,String> loader,
LogLevel logLevel,
Boolean minify,
List<String> nodeModules,
Boolean sourceMap,
String target)
Constructor that initializes the object based on literal property values passed by the
BundlingOptions.Builder. |
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
Map<String,String> |
getBuildArgs()
(experimental) Build arguments to pass when building the bundling image.
|
ICommandHooks |
getCommandHooks()
(experimental) Command hooks.
|
BundlingDockerImage |
getDockerImage()
(experimental) A custom bundling Docker image.
|
Map<String,String> |
getEnvironment()
(experimental) Environment variables defined when bundling runs.
|
String |
getEsbuildVersion()
(experimental) The version of esbuild to use when running in a Docker container.
|
List<String> |
getExternalModules()
(experimental) A list of modules that should be considered as externals (already available in the runtime).
|
Boolean |
getForceDockerBundling()
(experimental) Force bundling in a Docker container even if local bundling is possible.
|
Boolean |
getKeepNames()
(experimental) Whether to preserve the original `name` values even in minified code.
|
Map<String,String> |
getLoader()
(experimental) Use loaders to change how a given input file is interpreted.
|
LogLevel |
getLogLevel()
(experimental) Log level for esbuild.
|
Boolean |
getMinify()
(experimental) Whether to minify files when bundling.
|
List<String> |
getNodeModules()
(experimental) A list of modules that should be installed instead of bundled.
|
Boolean |
getSourceMap()
(experimental) Whether to include source maps when bundling.
|
String |
getTarget()
(experimental) Target environment for the generated JavaScript code.
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbuilderprotected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef - Reference to the JSII managed object.protected Jsii$Proxy(Map<String,String> buildArgs, ICommandHooks commandHooks, BundlingDockerImage dockerImage, Map<String,String> environment, String esbuildVersion, List<String> externalModules, Boolean forceDockerBundling, Boolean keepNames, Map<String,String> loader, LogLevel logLevel, Boolean minify, List<String> nodeModules, Boolean sourceMap, String target)
BundlingOptions.Builder.public final Map<String,String> getBuildArgs()
BundlingOptionsDefault: - no build arguments are passed
getBuildArgs in interface BundlingOptionspublic final ICommandHooks getCommandHooks()
BundlingOptionsDefault: - do not run additional commands
getCommandHooks in interface BundlingOptionspublic final BundlingDockerImage getDockerImage()
BundlingOptions
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.
Default: - use the Docker image provided by
getDockerImage in interface BundlingOptionspublic final Map<String,String> getEnvironment()
BundlingOptionsDefault: - no environment variables are defined.
getEnvironment in interface BundlingOptionspublic final String getEsbuildVersion()
BundlingOptionsDefault: - latest v0
getEsbuildVersion in interface BundlingOptionspublic final List<String> getExternalModules()
BundlingOptionsDefault: ['aws-sdk']
getExternalModules in interface BundlingOptionspublic final Boolean getForceDockerBundling()
BundlingOptions
This is useful if your function relies on node modules
that should be installed (nodeModules) in a Lambda compatible
environment.
Default: false
getForceDockerBundling in interface BundlingOptionspublic final Boolean getKeepNames()
BundlingOptions
In JavaScript the name property on functions and classes defaults to a
nearby identifier in the source code.
However, minification renames symbols to reduce code size and bundling
sometimes need to rename symbols to avoid collisions. That changes value of
the name property for many of these cases. This is usually fine because
the name property is normally only used for debugging. However, some
frameworks rely on the name property for registration and binding purposes.
If this is the case, you can enable this option to preserve the original
name values even in minified code.
Default: false
getKeepNames in interface BundlingOptionspublic final Map<String,String> getLoader()
BundlingOptions
Configuring a loader for a given file type lets you load that file type with
an import statement or a require call.
Default: - use esbuild default loaders
Example:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 {".png";"dataurl"; }
getLoader in interface BundlingOptionshttps://esbuild.github.io/api/#loaderpublic final LogLevel getLogLevel()
BundlingOptionsDefault: LogLevel.WARNING
getLogLevel in interface BundlingOptionspublic final Boolean getMinify()
BundlingOptionsDefault: false
getMinify in interface BundlingOptionspublic final List<String> getNodeModules()
BundlingOptionsModules are installed in a Lambda compatible environnment only when bundling runs in Docker.
Default: - all modules are bundled
getNodeModules in interface BundlingOptionspublic final Boolean getSourceMap()
BundlingOptionsDefault: false
getSourceMap in interface BundlingOptionspublic final String getTarget()
BundlingOptionsDefault: - the node version of the runtime
getTarget in interface BundlingOptionshttps://esbuild.github.io/api/#target@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson in interface software.amazon.jsii.JsiiSerializableCopyright © 2020. All rights reserved.