Interface: BuilderConfig
clientBuilder.BuilderConfig
Client builder configuration.
Properties
audiosprites
• Optional
audiosprites: AudioSpriteConfig
[]
Bundler audiosprite configurations. Audio sprites will be packed into the intermediate
build
directory. From there they can be included into the binary blob bundles using the
blobs
configuration.
The order of the array defines the priority of the audio sprites, meaning that if files match to multiple audio sprites they will only be placed in the first one that they match with.
The glob patterns here match against the original files in the src
directory.
blobs
• Optional
blobs: BundleConfig
[]
Distribution binary blob configurations. Binary blobs will be packed into the final dist
directory. All files in the intermediate build
directory that are not configured to a blob
will still be copied to the distribution. Cache-busting is also automatically applied to
every file that goes into the final distribution.
The order of the array defines the priority of the binary blobs, meaning that if files match to multiple blobs they will only be placed in the first one that they match with.
The glob patterns here match against files in the intermediate build
directory.
build
• Optional
build: string
Intermediate build directory for generated assets for bundling. Defaults to build
if not
provided.
config
• config: Config
Project configuration loaded from .project
file.
copy
• Optional
copy: string
| string
[]
Glob pattern(s) for copying files to the intermediate build
directory that are not packed
into spritesheets or audio sprites. Files that are included in the spritesheets and
audiosprites are automatically ignored from the copy list. That means you can safely specify
a wildcard pattern that copies every asset file in the source directory.
The copy task does some trivial compression where appropriate, such as removing whitespace from json files.
The glob patterns here match against the original files in the src
directory.
customImportRoot
• Optional
customImportRoot: string
Root path for custom imports. Required to maintain directory hierarchy when using a custom
rootDir
parameter for tsc
.
The path is relative to the src
directory.
customImports
• Optional
customImports: string
| string
[]
Custom files not copied by tsc
. These are usually non-standard file extensions that are
not copied by default, for example .graphql
.
The glob patterns here match against the original files in the src
directory.
devServerPort
• Optional
devServerPort: number
Port for the dev server. Defaults to 8080
if not set.
dist
• Optional
dist: string
Destination path for final bundle. Defaults to dist
if not provided.
entry
• Optional
entry: string
Main entrypoint. Defaults to main.mjs
if not provided.
The file lookup happens from the intermediate build directory where the TypeScript files are compiled to.
external
• Optional
external: string
| string
[]
Glob pattern(s) for copying external/static files directly to the final dist
directory.
The glob patterns here match against the original files in the src
directory.
Works similar to the copy patterns, except this copies directly to the distribution folder, bypassing the dist task entirely. This means any files included here but not in copy:
- Will not be added to the bundle map
- Will not be cache busted!
If files appear in both lists, then they will have two copies of the file in dist
;
one copy that is not cachebusted and one that is.
gulp
• gulp: Gulp
The gulp instance from the project’s gulpfile.
index
• Optional
index: string
| string
[]
Filename for the main index page. Defaults to index.html
if not provided.
Supports an array of filenames in case the application needs multiple html entry points.
scriptWatch
• Optional
scriptWatch: string
| string
[]
Watcher glob patterns for dev-env script compile. Watches all .ts
, .mts
and .json
files recursively if not provided.
The glob patterns here match against the original files in the src
directory.
spritesheets
• Optional
spritesheets: SpriteSheetConfig
[]
Bundler spritesheet configurations. Sprite sheets will be packed into the intermediate
build
directory. From there they can be included into the binary blob bundles using the
blobs
configuration.
The order of the array defines the priority of the sprite sheets, meaning that if files match to multiple sprite sheets they will only be placed in the first one that they match with.
The glob patterns here match against the original files in the src
directory.
src
• Optional
src: string
Source root path, ie. the base for all relative paths. Defaults to src
if not provided.
webpack
• Optional
webpack: Partial
<WebpackConfig
>
Webpack options to override built-in builder Webpack options. The options are deep merged with the default ones.