Class AddBundleOptions.Jsii$Proxy

    • Constructor Detail

      • Jsii$Proxy

        protected Jsii$Proxy​(software.amazon.jsii.JsiiObjectRef objRef)
        Constructor that initializes the object based on values retrieved from the JsiiObject.
        Parameters:
        objRef - Reference to the JSII managed object.
    • Method Detail

      • getFormat

        public final String getFormat()
        Description copied from interface: AddBundleOptions
        (experimental) Output format for the generated JavaScript files.

        There are currently three possible values that can be configured: "iife", "cjs", and "esm".

        If not set (undefined), esbuild picks an output format for you based on platform:

        • "cjs" if platform is "node"
        • "iife" if platform is "browser"
        • "esm" if platform is "neutral"

        Note: If making a bundle to run under node with ESM, set format to "esm" instead of setting platform to "neutral".

        Default: undefined

        Specified by:
        getFormat in interface AddBundleOptions
        See Also:
        https://esbuild.github.io/api/#format
      • getLoaders

        public final Map<String,​String> getLoaders()
        Description copied from interface: AddBundleOptions
        (experimental) Map of file extensions (without dot) and loaders to use for this file type.

        Loaders are appended to the esbuild command by --loader:.extension=loader

        Specified by:
        getLoaders in interface AddBundleOptions
      • getOutfile

        public final String getOutfile()
        Description copied from interface: AddBundleOptions
        (experimental) Bundler output path relative to the asset's output directory.

        Default: "index.js"

        Specified by:
        getOutfile in interface AddBundleOptions
      • getTsconfigPath

        public final String getTsconfigPath()
        Description copied from interface: AddBundleOptions
        (experimental) The path of the tsconfig.json file to use for bundling.

        Default: "tsconfig.json"

        Specified by:
        getTsconfigPath in interface AddBundleOptions
      • getExternals

        public final List<String> getExternals()
        Description copied from interface: BundlingOptions
        (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: []

        Specified by:
        getExternals in interface BundlingOptions
      • getWatchTask

        public final Boolean getWatchTask()
        Description copied from interface: BundlingOptions
        (experimental) 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.

        Default: true

        Specified by:
        getWatchTask in interface BundlingOptions
      • $jsii$toJson

        @Internal
        public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
        Specified by:
        $jsii$toJson in interface software.amazon.jsii.JsiiSerializable
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object