@angular-devkit/build-angular
- Version 13.3.5
- Published
- 633 kB
- 65 dependencies
- MIT license
Install
npm i @angular-devkit/build-angular
yarn add @angular-devkit/build-angular
pnpm add @angular-devkit/build-angular
Overview
Angular Webpack Build Facade
Index
Functions
Interfaces
BrowserBuilderOptions
- allowedCommonJsDependencies
- aot
- assets
- baseHref
- budgets
- buildOptimizer
- commonChunk
- crossOrigin
- deleteOutputPath
- deployUrl
- extractLicenses
- fileReplacements
- i18nDuplicateTranslation
- i18nMissingTranslation
- index
- inlineStyleLanguage
- localize
- main
- namedChunks
- ngswConfigPath
- optimization
- outputHashing
- outputPath
- poll
- polyfills
- preserveSymlinks
- progress
- resourcesOutputPath
- scripts
- serviceWorker
- showCircularDependencies
- sourceMap
- statsJson
- stylePreprocessorOptions
- styles
- subresourceIntegrity
- tsConfig
- vendorChunk
- verbose
- watch
- webWorkerTsConfig
ServerBuilderOptions
- bundleDependencies
- deleteOutputPath
- deployUrl
- externalDependencies
- extractLicenses
- fileReplacements
- i18nDuplicateTranslation
- i18nMissingTranslation
- inlineStyleLanguage
- localize
- main
- namedChunks
- optimization
- outputHashing
- outputPath
- poll
- preserveSymlinks
- progress
- resourcesOutputPath
- showCircularDependencies
- sourceMap
- statsJson
- stylePreprocessorOptions
- tsConfig
- verbose
- watch
Enums
Type Aliases
Namespaces
Functions
function executeBrowserBuilder
executeBrowserBuilder: ( options: BrowserBuilderSchema, context: BuilderContext, transforms?: { webpackConfiguration?: ExecutionTransformer<webpack.Configuration>; logging?: WebpackLoggingCallback; indexHtml?: IndexHtmlTransform; }) => Observable<any>;
Direct usage of this function is considered experimental.
Modifiers
@experimental
function executeDevServerBuilder
executeDevServerBuilder: ( options: DevServerBuilderOptions, context: BuilderContext, transforms?: { webpackConfiguration?: ExecutionTransformer<webpack.Configuration>; logging?: WebpackLoggingCallback; indexHtml?: IndexHtmlTransform; }) => Observable<any>;
Reusable implementation of the Angular Webpack development server builder.
Parameter options
Dev Server options.
Parameter context
The build context.
Parameter transforms
A map of transforms that can be used to hook into some logic (such as transforming webpack configuration before passing it to webpack).
Direct usage of this function is considered experimental.
Modifiers
@experimental
function executeExtractI18nBuilder
executeExtractI18nBuilder: ( options: ExtractI18nBuilderOptions, context: BuilderContext, transforms?: { webpackConfiguration?: ExecutionTransformer<webpack.Configuration>; }) => Promise<BuildResult>;
Direct usage of this function is considered experimental.
Modifiers
@experimental
function executeKarmaBuilder
executeKarmaBuilder: ( options: KarmaBuilderOptions, context: BuilderContext, transforms?: { webpackConfiguration?: ExecutionTransformer<Configuration>; karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions; }) => Observable<BuilderOutput>;
Direct usage of this function is considered experimental.
Modifiers
@experimental
function executeNgPackagrBuilder
executeNgPackagrBuilder: ( options: NgPackagrBuilderOptions, context: BuilderContext) => Observable<BuilderOutput>;
Direct usage of this function is considered experimental.
Modifiers
@experimental
function executeProtractorBuilder
executeProtractorBuilder: ( options: ProtractorBuilderOptions, context: BuilderContext) => Promise<BuilderOutput>;
Direct usage of this function is considered experimental.
Modifiers
@experimental
function executeServerBuilder
executeServerBuilder: ( options: ServerBuilderOptions, context: BuilderContext, transforms?: { webpackConfiguration?: ExecutionTransformer<webpack.Configuration>; }) => Observable<any>;
Direct usage of this function is considered experimental.
Modifiers
@experimental
Interfaces
interface AssetPatternObject
interface AssetPatternClass {}
property followSymlinks
followSymlinks?: boolean;
Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched.
property glob
glob: string;
The pattern to match.
property ignore
ignore?: string[];
An array of globs to ignore.
property input
input: string;
The input directory path in which to apply 'glob'. Defaults to the project root.
property output
output: string;
Absolute path within the output.
interface BrowserBuilderOptions
interface Schema {}
Browser target options
property allowedCommonJsDependencies
allowedCommonJsDependencies?: string[];
A list of CommonJS packages that are allowed to be used without a build time warning.
property aot
aot?: boolean;
Build using Ahead of Time compilation.
property assets
assets?: AssetPattern[];
List of static application assets.
property baseHref
baseHref?: string;
Base url for the application being built.
property budgets
budgets?: Budget[];
Budget thresholds to ensure parts of your application stay within boundaries which you set.
property buildOptimizer
buildOptimizer?: boolean;
Enables '@angular-devkit/build-optimizer' optimizations when using the 'aot' option.
property commonChunk
commonChunk?: boolean;
Generate a seperate bundle containing code used across multiple bundles.
property crossOrigin
crossOrigin?: CrossOrigin;
Define the crossorigin attribute setting of elements that provide CORS support.
property deleteOutputPath
deleteOutputPath?: boolean;
Delete the output path before building.
property deployUrl
deployUrl?: string;
URL where files will be deployed.
Deprecated
Use "baseHref" option, "APP_BASE_HREF" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url.
property extractLicenses
extractLicenses?: boolean;
Extract all licenses in a separate file.
property fileReplacements
fileReplacements?: FileReplacement[];
Replace compilation source files with other compilation source files in the build.
property i18nDuplicateTranslation
i18nDuplicateTranslation?: I18NTranslation;
How to handle duplicate translations for i18n.
property i18nMissingTranslation
i18nMissingTranslation?: I18NTranslation;
How to handle missing translations for i18n.
property index
index: IndexUnion;
Configures the generation of the application's HTML index.
property inlineStyleLanguage
inlineStyleLanguage?: InlineStyleLanguage;
The stylesheet language to use for the application's inline component styles.
property localize
localize?: Localize;
Translate the bundles in one or more locales.
property main
main: string;
The full path for the main entry point to the app, relative to the current workspace.
property namedChunks
namedChunks?: boolean;
Use file name for lazy loaded chunks.
property ngswConfigPath
ngswConfigPath?: string;
Path to ngsw-config.json.
property optimization
optimization?: OptimizationUnion;
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.io/guide/workspace-config#optimization-configuration.
property outputHashing
outputHashing?: OutputHashing;
Define the output filename cache-busting hashing mode.
property outputPath
outputPath: string;
The full path for the new output directory, relative to the current workspace.
By default, writes output to a folder named dist/ in the current project.
property poll
poll?: number;
Enable and define the file watching poll time period in milliseconds.
property polyfills
polyfills?: string;
The full path for the polyfills file, relative to the current workspace.
property preserveSymlinks
preserveSymlinks?: boolean;
Do not use the real path when resolving modules. If unset then will default to
true
if NodeJS option --preserve-symlinks is set.
property progress
progress?: boolean;
Log progress to the console while building.
property resourcesOutputPath
resourcesOutputPath?: string;
The path where style resources will be placed, relative to outputPath.
property scripts
scripts?: ExtraEntryPoint[];
Global scripts to be included in the build.
property serviceWorker
serviceWorker?: boolean;
Generates a service worker config for production builds.
property showCircularDependencies
showCircularDependencies?: boolean;
Show circular dependency warnings on builds.
Deprecated
The recommended method to detect circular dependencies in project code is to use either a lint rule or other external tooling.
property sourceMap
sourceMap?: SourceMapUnion;
Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.
property statsJson
statsJson?: boolean;
Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.
property stylePreprocessorOptions
stylePreprocessorOptions?: StylePreprocessorOptions;
Options to pass to style preprocessors.
property styles
styles?: ExtraEntryPoint[];
Global styles to be included in the build.
property subresourceIntegrity
subresourceIntegrity?: boolean;
Enables the use of subresource integrity validation.
property tsConfig
tsConfig: string;
The full path for the TypeScript configuration file, relative to the current workspace.
property vendorChunk
vendorChunk?: boolean;
Generate a seperate bundle containing only vendor libraries. This option should only used for development.
property verbose
verbose?: boolean;
Adds more details to output logging.
property watch
watch?: boolean;
Run build when files change.
property webWorkerTsConfig
webWorkerTsConfig?: string;
TypeScript configuration for Web Worker modules.
interface Budget
interface Budget {}
property baseline
baseline?: string;
The baseline size for comparison.
property error
error?: string;
The threshold for error relative to the baseline (min & max).
property maximumError
maximumError?: string;
The maximum threshold for error relative to the baseline.
property maximumWarning
maximumWarning?: string;
The maximum threshold for warning relative to the baseline.
property minimumError
minimumError?: string;
The minimum threshold for error relative to the baseline.
property minimumWarning
minimumWarning?: string;
The minimum threshold for warning relative to the baseline.
property name
name?: string;
The name of the bundle.
property type
type: Type;
The type of budget.
property warning
warning?: string;
The threshold for warning relative to the baseline (min & max).
interface ExtraEntryPointObject
interface ExtraEntryPointClass {}
property bundleName
bundleName?: string;
The bundle name for this extra entry point.
property inject
inject?: boolean;
If the bundle will be referenced in the HTML file.
property input
input: string;
The file to include.
interface FileReplacement
interface FileReplacement {}
property replace
replace?: string;
property replaceWith
replaceWith?: string;
property src
src?: string;
property with
with?: string;
interface KarmaBuilderOptions
interface Schema {}
Karma target options for Build Facade.
property assets
assets?: AssetPattern[];
List of static application assets.
property browsers
browsers?: string;
Override which browsers tests are run against.
property codeCoverage
codeCoverage?: boolean;
Output a code coverage report.
property codeCoverageExclude
codeCoverageExclude?: string[];
Globs to exclude from code coverage.
property fileReplacements
fileReplacements?: FileReplacement[];
Replace compilation source files with other compilation source files in the build.
property include
include?: string[];
Globs of files to include, relative to workspace or project root. There are 2 special cases: - when a path to directory is provided, all spec files ending ".spec.@(ts|tsx)" will be included - when a path to a file is provided, and a matching spec file exists it will be included instead.
property inlineStyleLanguage
inlineStyleLanguage?: InlineStyleLanguage;
The stylesheet language to use for the application's inline component styles.
property karmaConfig
karmaConfig: string;
The name of the Karma configuration file.
property main
main: string;
The name of the main entry-point file.
property poll
poll?: number;
Enable and define the file watching poll time period in milliseconds.
property polyfills
polyfills?: string;
The name of the polyfills file.
property preserveSymlinks
preserveSymlinks?: boolean;
Do not use the real path when resolving modules. If unset then will default to
true
if NodeJS option --preserve-symlinks is set.
property progress
progress?: boolean;
Log progress to the console while building.
property reporters
reporters?: string[];
Karma reporters to use. Directly passed to the karma runner.
property scripts
scripts?: ExtraEntryPoint[];
Global scripts to be included in the build.
property sourceMap
sourceMap?: SourceMapUnion;
Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.
property stylePreprocessorOptions
stylePreprocessorOptions?: StylePreprocessorOptions;
Options to pass to style preprocessors
property styles
styles?: ExtraEntryPoint[];
Global styles to be included in the build.
property tsConfig
tsConfig: string;
The name of the TypeScript configuration file.
property watch
watch?: boolean;
Run build when files change.
property webWorkerTsConfig
webWorkerTsConfig?: string;
TypeScript configuration for Web Worker modules.
interface NgPackagrBuilderOptions
interface Schema {}
ng-packagr target options for Build Architect. Use to build library projects.
interface OptimizationObject
interface OptimizationClass {}
property fonts
fonts?: FontsUnion;
Enables optimization for fonts. This option requires internet access.
HTTPS_PROXY
environment variable can be used to specify a proxy server.
property scripts
scripts?: boolean;
Enables optimization of the scripts output.
property styles
styles?: StylesUnion;
Enables optimization of the styles output.
interface ProtractorBuilderOptions
interface Schema {}
Protractor target options for Build Facade.
property baseUrl
baseUrl?: string;
Base URL for protractor to connect to.
property devServerTarget
devServerTarget?: string;
A dev-server builder target to run tests against in the format of
project:target[:configuration]
. You can also pass in more than one configuration name as a comma-separated list. Example:project:target:production,staging
.
property grep
grep?: string;
Execute specs whose names match the pattern, which is internally compiled to a RegExp.
property host
host?: string;
Host to listen on.
property invertGrep
invertGrep?: boolean;
Invert the selection specified by the 'grep' option.
property port
port?: number;
The port to use to serve the application.
property protractorConfig
protractorConfig: string;
The name of the Protractor configuration file.
property specs
specs?: string[];
Override specs in the protractor config.
property suite
suite?: string;
Override suite in the protractor config.
property webdriverUpdate
webdriverUpdate?: boolean;
Try to update webdriver.
interface ServerBuilderOptions
interface Schema {}
property bundleDependencies
bundleDependencies?: BundleDependenciesUnion;
Which external dependencies to bundle into the bundle. By default, all of node_modules will be bundled.
property deleteOutputPath
deleteOutputPath?: boolean;
Delete the output path before building.
property deployUrl
deployUrl?: string;
URL where files will be deployed.
Deprecated
Use "baseHref" browser builder option, "APP_BASE_HREF" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url.
property externalDependencies
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.
property extractLicenses
extractLicenses?: boolean;
Extract all licenses in a separate file, in the case of production builds only.
property fileReplacements
fileReplacements?: FileReplacement[];
Replace compilation source files with other compilation source files in the build.
property i18nDuplicateTranslation
i18nDuplicateTranslation?: I18NTranslation;
How to handle duplicate translations for i18n.
property i18nMissingTranslation
i18nMissingTranslation?: I18NTranslation;
How to handle missing translations for i18n.
property inlineStyleLanguage
inlineStyleLanguage?: InlineStyleLanguage;
The stylesheet language to use for the application's inline component styles.
property localize
localize?: Localize;
Translate the bundles in one or more locales.
property main
main: string;
The name of the main entry-point file.
property namedChunks
namedChunks?: boolean;
Use file name for lazy loaded chunks.
property optimization
optimization?: OptimizationUnion;
Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.
property outputHashing
outputHashing?: OutputHashing;
Define the output filename cache-busting hashing mode.
property outputPath
outputPath: string;
Path where output will be placed.
property poll
poll?: number;
Enable and define the file watching poll time period in milliseconds.
property preserveSymlinks
preserveSymlinks?: boolean;
Do not use the real path when resolving modules. If unset then will default to
true
if NodeJS option --preserve-symlinks is set.
property progress
progress?: boolean;
Log progress to the console while building.
property resourcesOutputPath
resourcesOutputPath?: string;
The path where style resources will be placed, relative to outputPath.
property showCircularDependencies
showCircularDependencies?: boolean;
Show circular dependency warnings on builds.
Deprecated
The recommended method to detect circular dependencies in project code is to use either a lint rule or other external tooling.
property sourceMap
sourceMap?: SourceMapUnion;
Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.
property statsJson
statsJson?: boolean;
Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.
property stylePreprocessorOptions
stylePreprocessorOptions?: StylePreprocessorOptions;
Options to pass to style preprocessors
property tsConfig
tsConfig: string;
The name of the TypeScript configuration file.
property verbose
verbose?: boolean;
Adds more details to output logging.
property watch
watch?: boolean;
Run build when files change.
interface SourceMapObject
interface SourceMapClass {}
interface StylePreprocessorOptions
interface StylePreprocessorOptions {}
Options to pass to style preprocessors.
property includePaths
includePaths?: string[];
Paths to include. Paths will be resolved to workspace root.
Enums
enum CrossOrigin
enum CrossOrigin { Anonymous = 'anonymous', None = 'none', UseCredentials = 'use-credentials',}
Define the crossorigin attribute setting of elements that provide CORS support.
member Anonymous
Anonymous = 'anonymous'
member None
None = 'none'
member UseCredentials
UseCredentials = 'use-credentials'
enum OutputHashing
enum OutputHashing { All = 'all', Bundles = 'bundles', Media = 'media', None = 'none',}
Define the output filename cache-busting hashing mode.
enum Type
enum Type { All = 'all', AllScript = 'allScript', Any = 'any', AnyComponentStyle = 'anyComponentStyle', AnyScript = 'anyScript', Bundle = 'bundle', Initial = 'initial',}
The type of budget.
Type Aliases
type AssetPattern
type AssetPattern = AssetPatternClass | string;
type BrowserBuilderOutput
type BrowserBuilderOutput = json.JsonObject & BuilderOutput & { baseOutputPath: string; outputPaths: string[]; /** * @deprecated in version 9. Use 'outputPaths' instead. */ outputPath: string; };
Direct usage of this type is considered experimental.
Modifiers
@experimental
type DevServerBuilderOptions
type DevServerBuilderOptions = Schema & json.JsonObject;
type DevServerBuilderOutput
type DevServerBuilderOutput = DevServerBuildOutput & { baseUrl: string;};
Direct usage of this type is considered experimental.
Modifiers
@experimental
type ExecutionTransformer
type ExecutionTransformer<T> = (input: T) => T | Promise<T>;
Copyright Google LLC All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license
type ExtractI18nBuilderOptions
type ExtractI18nBuilderOptions = Schema & JsonObject;
type ExtraEntryPoint
type ExtraEntryPoint = ExtraEntryPointClass | string;
type KarmaConfigOptions
type KarmaConfigOptions = ConfigOptions & { buildWebpack?: unknown; configFile?: string;};
type OptimizationUnion
type OptimizationUnion = boolean | OptimizationClass;
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.io/guide/workspace-config#optimization-configuration.
type ServerBuilderOutput
type ServerBuilderOutput = json.JsonObject & BuilderOutput & { baseOutputPath: string; outputPaths: string[]; /** * @deprecated in version 9. Use 'outputPaths' instead. */ outputPath: string; };
Direct usage of this type is considered experimental.
Modifiers
@experimental
type SourceMapUnion
type SourceMapUnion = boolean | SourceMapClass;
Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.
Namespaces
namespace @babel/core
module '@babel/core' {}
Copyright Google LLC All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license
namespace @babel/generator
module '@babel/generator' {}
namespace @babel/helper-annotate-as-pure
module '@babel/helper-annotate-as-pure' {}
Copyright Google LLC All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license
function annotateAsPure
annotateAsPure: ( pathOrNode: import('@babel/types').Node | { node: import('@babel/types').Node }) => void;
namespace @babel/template
module '@babel/template' {}
namespace @babel/traverse
module '@babel/traverse' {}
namespace babel-loader
module 'babel-loader' {}
Copyright Google LLC All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license
function custom
custom: <T>(customizer: BabelLoaderCustomizer<T>) => any;
type BabelLoaderCustomizer
type BabelLoaderCustomizer<T> = (babel: typeof import('@babel/core')) => { customOptions?( this: import('webpack').loader.LoaderContext, loaderOptions: Record<string, unknown>, loaderArguments: { source: string; map?: unknown } ): Promise<{ custom?: T; loader: Record<string, unknown> }>; config?( this: import('webpack').loader.LoaderContext, configuration: import('@babel/core').PartialConfig, loaderArguments: { source: string; map?: unknown; customOptions: T } ): import('@babel/core').TransformOptions; result?( this: import('webpack').loader.LoaderContext, result: import('@babel/core').BabelFileResult, context: { source: string; map?: unknown; customOptions: T; configuration: import('@babel/core').PartialConfig; options: import('@babel/core').TransformOptions; } ): import('@babel/core').BabelFileResult;};
Package Files (17)
- src/babel-bazel.d.ts
- src/babel/babel-loader.d.ts
- src/builders/browser/index.d.ts
- src/builders/browser/schema.d.ts
- src/builders/dev-server/index.d.ts
- src/builders/extract-i18n/index.d.ts
- src/builders/karma/index.d.ts
- src/builders/karma/schema.d.ts
- src/builders/ng-packagr/index.d.ts
- src/builders/ng-packagr/schema.d.ts
- src/builders/protractor/index.d.ts
- src/builders/protractor/schema.d.ts
- src/builders/server/index.d.ts
- src/builders/server/schema.d.ts
- src/index.d.ts
- src/transforms.d.ts
- src/typings.d.ts
Dependencies (65)
- @ampproject/remapping
- @angular-devkit/architect
- @angular-devkit/build-webpack
- @angular-devkit/core
- @babel/core
- @babel/generator
- @babel/helper-annotate-as-pure
- @babel/plugin-proposal-async-generator-functions
- @babel/plugin-transform-async-to-generator
- @babel/plugin-transform-runtime
- @babel/preset-env
- @babel/runtime
- @babel/template
- @discoveryjs/json-ext
- @ngtools/webpack
- ansi-colors
- babel-loader
- babel-plugin-istanbul
- browserslist
- cacache
- circular-dependency-plugin
- copy-webpack-plugin
- core-js
- critters
- css-loader
- esbuild
- esbuild-wasm
- glob
- https-proxy-agent
- inquirer
- jsonc-parser
- karma-source-map-support
- less
- less-loader
- license-webpack-plugin
- loader-utils
- mini-css-extract-plugin
- minimatch
- open
- ora
- parse5-html-rewriting-stream
- piscina
- postcss
- postcss-import
- postcss-loader
- postcss-preset-env
- regenerator-runtime
- resolve-url-loader
- rxjs
- sass
- sass-loader
- semver
- source-map-loader
- source-map-support
- stylus
- stylus-loader
- terser
- text-table
- tree-kill
- tslib
- webpack
- webpack-dev-middleware
- webpack-dev-server
- webpack-merge
- webpack-subresource-integrity
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (8)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@angular-devkit/build-angular
.
- Markdown[](https://www.jsdocs.io/package/@angular-devkit/build-angular)
- HTML<a href="https://www.jsdocs.io/package/@angular-devkit/build-angular"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 6278 ms. - Missing or incorrect documentation? Open an issue for this package.