@Stability(value=Experimental) public static final class BundlingOptions.Builder extends Object implements software.amazon.jsii.Builder<BundlingOptions>
BundlingOptions| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
BundlingOptions |
build()
Builds the configured instance.
|
BundlingOptions.Builder |
externals(List<String> externals)
Sets the value of
BundlingOptions.getExternals() |
BundlingOptions.Builder |
sourcemap(Boolean sourcemap)
Sets the value of
BundlingOptions.getSourcemap() |
BundlingOptions.Builder |
watchTask(Boolean watchTask)
Sets the value of
BundlingOptions.getWatchTask() |
@Stability(value=Experimental) public BundlingOptions.Builder externals(List<String> externals)
BundlingOptions.getExternals()externals - You 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.
this@Stability(value=Experimental) public BundlingOptions.Builder sourcemap(Boolean sourcemap)
BundlingOptions.getSourcemap()sourcemap - Include a source map in the bundle.this@Stability(value=Experimental) public BundlingOptions.Builder watchTask(Boolean watchTask)
BundlingOptions.getWatchTask()watchTask - In addition to the `bundle:xyz` task, creates `bundle:xyz:watch` task which will invoke the same esbuild command with the `--watch` flag.
This can be used
to continusouly watch for changes.this@Stability(value=Experimental) public BundlingOptions build()
build in interface software.amazon.jsii.Builder<BundlingOptions>BundlingOptionsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.