Class Bundler.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.javascript.Bundler.Builder
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Bundler.BuilderaddToPreCompile(Boolean addToPreCompile)(experimental) Install thebundlecommand as a pre-compile phase.Bundler.BuilderassetsDir(String assetsDir)(experimental) Output directory for all bundles.Bundlerbuild()static Bundler.Buildercreate(Project project)Bundler.BuilderesbuildVersion(String esbuildVersion)(experimental) The semantic version requirement foresbuild.Bundler.Builderloaders(Map<String,String> loaders)(experimental) Map of file extensions (without dot) and loaders to use for this file type.
-
-
-
Method Detail
-
create
@Stability(Experimental) public static Bundler.Builder create(Project project)
- Parameters:
project- This parameter is required.- Returns:
- a new instance of
Bundler.Builder.
-
addToPreCompile
@Stability(Experimental) public Bundler.Builder addToPreCompile(Boolean addToPreCompile)
(experimental) Install thebundlecommand as a pre-compile phase.Default: true
- Parameters:
addToPreCompile- Install thebundlecommand as a pre-compile phase. This parameter is required.- Returns:
this
-
assetsDir
@Stability(Experimental) public Bundler.Builder assetsDir(String assetsDir)
(experimental) Output directory for all bundles.Default: "assets"
- Parameters:
assetsDir- Output directory for all bundles. This parameter is required.- Returns:
this
-
esbuildVersion
@Stability(Experimental) public Bundler.Builder esbuildVersion(String esbuildVersion)
(experimental) The semantic version requirement foresbuild.Default: - no specific version (implies latest)
- Parameters:
esbuildVersion- The semantic version requirement foresbuild. This parameter is required.- Returns:
this
-
loaders
@Stability(Experimental) public Bundler.Builder loaders(Map<String,String> loaders)
(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- Parameters:
loaders- Map of file extensions (without dot) and loaders to use for this file type. This parameter is required.- Returns:
this
-
-