Type object
Schema URL https://catalog.lintel.tools/schemas/schemastore/angular-json/_shared/latest--schema.json
Parent schema angular-json
Type: object

Application builder target options

Properties

tsConfig string required

The full path for the TypeScript configuration file, relative to the current workspace.

Define the assets to be copied to the output directory. These assets are copied as-is without any further processing or hashing.

Default:
[]
browser string

The full path for the browser entry point to the application, relative to the current workspace.

server string | boolean

The full path for the server entry point to the application, relative to the current workspace.

polyfills string[]

A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.

Default:
[]
deployUrl string

Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations.

security object

Security features to protect against XSS and other common attacks

2 nested properties
allowedHosts string[]

A list of hostnames that are allowed to access the server-side application. For more information, see https://angular.dev/best-practices/security#preventing-server-side-request-forgery-ssrf.

uniqueItems=true
autoCsp object | boolean

Enables automatic generation of a hash-based Strict Content Security Policy (https://web.dev/articles/strict-csp#choose-hash) based on scripts in index.html. Will default to true once we are out of experimental/preview phases.

Default: false
scripts object | string[]

Global scripts to be included in the build.

Default:
[]
styles object | string[]

Global styles to be included in the build.

Default:
[]
inlineStyleLanguage string

The stylesheet language to use for the application's inline component styles.

Default: "css"
Values: "css" "less" "sass" "scss"
stylePreprocessorOptions object

Options to pass to style preprocessors.

2 nested properties
includePaths string[]

Paths to include. Paths will be resolved to workspace root.

Default:
[]
sass object

Options to pass to the sass preprocessor.

3 nested properties
fatalDeprecations string[]

A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.

silenceDeprecations string[]

A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.

futureDeprecations string[]

A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.

externalDependencies string[]

Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime. Note: @foo/bar marks all paths within the @foo/bar package as external, including sub-paths like @foo/bar/baz.

Default:
[]
clearScreen boolean

Automatically clear the terminal screen during rebuilds.

Default: false
optimization object | boolean

Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.

Default: true
loader object

Defines the type of loader to use with a specified file extension when used with a JavaScript import. text inlines the content as a string; binary inlines the content as a Uint8Array; file emits the file and provides the runtime location of the file; dataurl inlines the content as a data URL with best guess of MIME type; base64 inlines the content as a Base64-encoded string; empty considers the content to be empty and not include it in bundles.

define Record<string, string>

Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.

conditions string[]

Custom package resolution conditions used to resolve conditional exports/imports. Defaults to ['module', 'development'/'production']. The following special conditions are always present if the requirements are satisfied: 'default', 'import', 'require', 'browser', 'node'.

fileReplacements fileReplacement[]

Replace compilation source files with other compilation source files in the build.

Default:
[]
outputPath object | string

Specify the output path relative to workspace root.

aot boolean

Build using Ahead of Time compilation.

Default: true
sourceMap object | boolean

Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.

Default: false
baseHref string

Base url for the application being built.

verbose boolean

Adds more details to output logging.

Default: false
progress boolean

Log progress to the console while building.

Default: true
i18nMissingTranslation string

How to handle missing translations for i18n.

Default: "warning"
Values: "warning" "error" "ignore"
i18nDuplicateTranslation string

How to handle duplicate translations for i18n.

Default: "warning"
Values: "warning" "error" "ignore"
localize boolean | string[]

Translate the bundles in one or more locales.

watch boolean

Run build when files change.

Default: false
outputHashing string

Define the output filename cache-busting hashing mode.

  • none: No hashing.
  • all: Hash for all output bundles.
  • media: Hash for all output media (e.g., images, fonts, etc. that are referenced in CSS files).
  • bundles: Hash for output of lazy and main bundles.
Default: "none"
Values: "none" "all" "media" "bundles"
poll number

Enable and define the file watching poll time period in milliseconds.

deleteOutputPath boolean

Delete the output path before building.

Default: true
extractLicenses boolean

Extract all licenses in a separate file.

Default: true
namedChunks boolean

Use file name for lazy loaded chunks.

Default: false
subresourceIntegrity boolean

Enables the use of subresource integrity validation.

Default: false
serviceWorker string | boolean

Generates a service worker configuration.

Default: false
index string | object | boolean

Configures the generation of the application's HTML index.

statsJson boolean

Generates a 'stats.json' file which can be analyzed with https://esbuild.github.io/analyze/.

Default: false
budgets budget[]

Budget thresholds to ensure parts of your application stay within boundaries which you set.

Default:
[]
webWorkerTsConfig string

TypeScript configuration for Web Worker modules.

crossOrigin string

Define the crossorigin attribute setting of elements that provide CORS support.

Default: "none"
Values: "none" "anonymous" "use-credentials"
allowedCommonJsDependencies string[]

A list of CommonJS or AMD packages that are allowed to be used without a build time warning. Use '*' to allow all.

Default:
[]
prerender boolean | object

Prerender (SSG) pages of your application during build time.

ssr boolean | object

Server side render (SSR) pages of your application during runtime.

Default: false
appShell boolean

Generates an application shell during build time.

outputMode string

Defines the type of build output artifact. 'static': Generates a static site build artifact for deployment on any static hosting service. 'server': Generates a server application build artifact, required for applications using hybrid rendering or APIs.

Values: "static" "server"

Definitions

assetPattern object | string
fileReplacement object
replace string required
pattern=\.(([cm]?[jt])sx?|json)$
with string required
pattern=\.(([cm]?[jt])sx?|json)$
budget object
type string required

The type of budget.

Values: "all" "allScript" "any" "anyScript" "anyComponentStyle" "bundle" "initial"
name string

The name of the bundle.

baseline string

The baseline size for comparison.

maximumWarning string

The maximum threshold for warning relative to the baseline.

maximumError string

The maximum threshold for error relative to the baseline.

minimumWarning string

The minimum threshold for warning relative to the baseline.

minimumError string

The minimum threshold for error relative to the baseline.

warning string

The threshold for warning relative to the baseline (min & max).

error string

The threshold for error relative to the baseline (min & max).