Interface BundlingOptions
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
AddBundleOptions
- All Known Implementing Classes:
AddBundleOptions.Jsii$Proxy,BundlingOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.161Z") @Stability(Experimental) public interface BundlingOptions extends software.amazon.jsii.JsiiSerializable
(experimental) Options for bundling.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBundlingOptions.BuilderA builder forBundlingOptionsstatic classBundlingOptions.Jsii$ProxyAn implementation forBundlingOptions
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static BundlingOptions.Builderbuilder()default List<String>getExternals()(experimental) You can mark a file or a package as external to exclude it from your build.default BooleangetSourcemap()(experimental) Include a source map in the bundle.default BooleangetWatchTask()(experimental) In addition to thebundle:xyztask, createsbundle:xyz:watchtask which will invoke the same esbuild command with the--watchflag.
-
-
-
Method Detail
-
getExternals
@Stability(Experimental) @Nullable default List<String> getExternals()
(experimental) 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.
Default: []
-
getSourcemap
@Stability(Experimental) @Nullable default Boolean getSourcemap()
(experimental) Include a source map in the bundle.Default: false
-
getWatchTask
@Stability(Experimental) @Nullable default Boolean getWatchTask()
(experimental) In addition to thebundle:xyztask, createsbundle:xyz:watchtask which will invoke the same esbuild command with the--watchflag.This can be used to continusouly watch for changes.
Default: true
-
builder
@Stability(Experimental) static BundlingOptions.Builder builder()
- Returns:
- a
BundlingOptions.BuilderofBundlingOptions
-
-