Packages

@ngtools/webpack

22.2.5 · 28 Oct 2026MIT3.7M / weekRepositorynpmAtom feed

Deprecated by its maintainers: Angular's Webpack support is deprecated. Use the esbuild and Vite-based "@angular/build" package instead.What to use instead
Your version

8.0.0

major28 May 2019Where it was published

8.3.29 is the newest release of 8.x.

In short

1 new5 changed

Release note

Welcome to version 8.0 of Angular and the CLI.

This release includes some significant new features:

  • Differential Loading is a build system feature in the CLI. It builds two versions of your application. One version is for modern browsers, and has a 10-30% smaller JS bundle size and fewer required polyfills. The second version works in older browsers. During ng update, we make some minor changes to your application to make it possible for all browsers to automatically downloaded the most suitable bundles. This change requires no server-side or serving infrastructure changes. The change is enabled by default via the target field set to es2015 in application’s tsconfig.json. If this change breaks your application, you can change the value back to es5 which disables differential loading. Thanks to Manfred Steyer github.com/manfredsteyer for upstreaming his excellent work on ngx-build-plus. See the documentation at angular.io/guide/deployment

  • Support for EcmaScript dynamic import() for lazy loading of routes. This aligns Angular with the JavaScript specification and makes your application more compatible with tooling. ng update will automatically change the loadChildren syntax to import(), and we no longer recommend using the string-based style like path/to/module#ModuleName. Thanks to Craig Spence github.com/phenomnomnominal for adding support for this.

  • WebWorker bundling is now automatic in the CLI. This lets you easily write code that moves expensive computation to a separate thread, and have that bundled in a separate script that works in the browser. Thanks to Jason Miller github.com/developit for writing the Webpack plugin and assisting us with integrating this feature into the CLI. See the documentation at angular.io/guide/web-worker.

  • CLI telemetry is an opt-in feature that lets you report CLI usage data to the Angular team, and also to your own Google Analytics account. This lets us make better decisions about which CLI features to prioritize, and measure the impact of our improvements. See the documentation at angular.io/analytics

  • Builders is a new API in the CLI that allows tooling developers to replace the behavior of CLI commands such as build and test. Before 8.0.0 we will add documentation, for now you can see a preview at pr29964-c99aea0.ngbuilds.io/guide/architect and read the blog post. As part of 8.0.0 we are working with cloud providers to take advantage of Architect to provide a new deploy command. Along with Architect, we've added a Workspace API for tools that need to read or write the angular.json file; see github.com/angular/angular-cli/blob/master/pack…

  • Reduced transitive tarball download size of @angular/cli by 60%

To update, please visit update.angular.io

Note: if you configure Node.js with extra memory for your ng build command, you may need to do the same for ng update since this update loads your program in memory.

Breaking Changes

@angular-devkit/build-angular: use `sass` instead of `node-sass` (ce15899) we no longer use `node-sass` by default, instead we use `sass` (dart-sass).

While in most cases this should not have an impact the generated code, dart sass has some differences from Ruby Sass. See github.com/sass/dart-sass for more details

If you wish to use node-sass instead of sass you need to install node-sass as a dev dependency.

npm users

npm install node-sass --save-dev

yarn users

yarn add node-sass --dev

Note: for larger Sass projects to avoid this performance hit you might want to install fibers. See: npmjs.com/package/fibers

Ref: TOOL-748

@angular-devkit/core: Remove dep on chokidar (eb5643e) Users who rely on angular-devkit/core to do the file watching must add chokidar to their devDependencies.

@angular-devkit/build-angular: disable by default stylesheet root relative URL rebasing (94b087c) Root relative URLs are a standardized method to reference a resource path from the root of a host. The previous behavior of the Angular CLI prevented this from occuring and resulted in an inability to reference stylesheet assets in this manner. The initial reason for this behavior is no longer present in the internal implementation of the Angular CLI. Therefore, this now unnecessary and non-standard behavior is being phased out. If an application currently relies on this behavior, a compatibility option `rebaseRootRelativeCssUrls` has been provided for the 8.x release cycle to facilitate transition away from this non-standard and limiting behavior. The recommended method to transition is to use relative paths within the source stylesheet. This allows the build system to process and generate a full URL for the asset.

Schematics are now async For Schematics authors: note that schematics have always been potentially async, but now they all are.


Commits

@angular/cli (8.0.0) Commit Description Notes

verify Angular version is supported

automatically update angular builders when CLI is updated

[Closes #13581]

add tracking for command duration

support stable architect API

allows analytics sharing with a third party

add validation logic for analytics in ng config

add custom implementation for analytics for commands

add support for analytics command proper

add prompt on post install step

add analytic support to commands and command-runner

add universal-analytics as dependency

add `@nguniversal/*` to ng version

[Closes #9959]

update minimum required Node.js version to 10.9

Add VsCode recommendation for Angular Console

Add VsCode extension recommendations

support pnpm as a package manager option

ng config doesn't parse positional array

[Closes #14516]

ng generate --help shows the wrong collection

[Closes #14519]

show analytics prompt when no global configuration file

[Closes #14486]

standardize TTY checks

ensure git repository is clean before updates

show error when using x18n command on Node.js 12.0

improve error handling of update command

@bazel/* are not shown in `ng version`

prevent nested schematic execution from generating analytics

[Closes #14190]

enable analytics for safe builders

[Closes #14355]

print full error when package is not found

honor builder schema additional properties option

[Closes #14354]

remove Angular specific version check from base architect command

[Closes #14266]

only show postinstall prompt when global analytics not configured

add missing experimentalImportFactories to schema

update config schema for karma webworker

improve opt-out language

dont force a prompt on non-interactive terminals

if no global config file found, analytics can be null

don't remove scripts from package.json

fix import path for TimingOptions

[Closes #13978]

remove redundant typescript/compiler-cli compatibility check

remove deprecated eject command

explicitly define console color logging

wrap `opn` in a new Promise because `opn` is already resolve is already resolve.

Add an error message when we call `ng doc` without keyword. Currently, we open a page with the keyword `undefined`. (#13604)

update terser-webpack-plugin (#13589)

[Closes #13582]

schematics commands should fail on unknown options

[Closes #12549]

remove unsupported `dryRun` and `force` from `ng add`

[Closes #13479]

ng-add should resolve package.json

@angular-devkit/architect (0.800.0) Commit Description Notes

add analytics to builder context

add new context methods

getOptionsForTarget should return null

add scheduleTargetAndForget function

add targetFromTargetString() function

QoL changes for builders

allow for a different output type

add generic architect builders

add node architect host

New Architect API first draft

error run on input schema error (#14315)

[Closes #14269]

propagate option validation errors

consume the default export in TestingArchitectHost

set proper name in TestingArchitectHost

fix incorrect relative core import

remove experimental API

ensure workspaceRoot is actually set to workspaceRoot

properly subscribe to error handlers

properly report errors thrown by builder

@angular-devkit/build-angular (0.800.0) Commit Description Notes

use evergreen version of zone.js with ES2015

remove experimentalImportFactories option

[Closes #14218]

warn when target greater es2015

deprecate `es5BrowserSupport` option in browser builder

enable differential loading for es2015 builds

wire up index generation for differential loading

support web workers in karma builder

support karma builder webpack transformation

improve handling of nomodules and modules in index generation

differential loading

add safari-nomodule snippet

update to core-js 3

[Closes #13954]

support TS web workers

support module web workers.

write index.html for differential loading

add experimentalImportFactories option

use builder name for category

add analytics for build

implement stable architect API for extract-i18n

add AppShell new API builder

add server output path

implement stable architect API for karma

use `sass` instead of `node-sass`

add Server Builder v2

enable webpack profile when using stats-json flag

[Closes #13907]

implement stable architect API for protractor

deprecate `profile` option in build

remove Closure compiler i18n code for ivy

move dev-server to new API

re-export schemas

browserTarget should match target pattern

add support for tslint 5.13+

add Browser Builder v2

change es5BrowserSupport output filename to `polyfills.es5.js`

[Closes #13808]

move tslint to new API

dev-server port number mismatches in logs when using `port=0`

[Closes #14499]

absolute outputPath outputs index.html in wrong location

[Closes #14474]

normalize sourceMap options in karma webpack plugin

[Closes #14457]

show error for missing modules

[Closes #14421]

extract i18n should only show warnings/errors

[Closes #14373]

propagate protractor errors during execution

stop dev server fallback outside of serve path

protractor should use dev server baseUrl

account for dynamic port with dev-server baseUrl

load polyfills-es5 on test

[Closes #14335]

never split polyfill chunks

[Closes #14280]

relax typescript peerDep

used named chunks for dynamic imports

[Closes #14251]

e2e does not respect dev-server host and port settings (#14165)

[Closes #14151]

live reload cannot be disabled

[Closes #14300]

skip version check if unit-testing

add Angular version check into required builders

use known Terser global defs

remove pure_getters

[Closes #9231]

[Closes #11439]

[Closes #12096]

[Closes #12128]

pass system path to readTsconfig

set correct peerDependencies for TypeScript

run build steps for differential loading in sequence to avoid confusing progress information

ignore bundle budgets when running karma or devserver

[Closes #14100]

verify chunk files exist before accessing

update utility function output type

ensure correct dev server path with public host option

[Closes #13627]

fix countOccurences

use package import for build-webpack in server builder

update speed-measure-webpack-plugin to 1.3.1

[Closes #12763]

passing port 0 when using serve will not find a suitable port

don't show warning when font shorthand is used

[Closes #9648]

resolve fonts with space in filename

[Closes #9648]

fail the build if service worker fails

fix base href insertion when HTML is in a single line

[Closes #13851]

fix check for absolute paths in windows in server config

[Closes #13865]

[Closes #1139]

don't bundle linked modules when `bundleDependencies` in `none` in server builder

[Closes #13817]

sourceMap option not working in tests

[Closes #13766]

add promise polyfill to --es5BrowserSupport provided polyfills

improve webpack loader resolution

minimum threshold

disable by default stylesheet root relative URL rebasing

added warning for ES2017

remove unneeded script element type

throw error when multiple bundles have been name the same

[Closes #13568]

error when both `baseUrl` and `devServerTarget` are used in protractor

[Closes #13611]

use sourcemap object in karma plugin (#13584)

[Closes #13580]

remove deprecated `istanbul` from dependencies (#13567)

[Closes #13562]

add missing open parenthesis in stacktrace (#13565)

[Closes #13558]

@angular-devkit/build-ng-packagr (0.800.0) Commit Description Notes

add support for ng-packagr version 5

implement stable architect API

propogate errors during execution

@angular-devkit/build-optimizer (0.800.0) Commit Description Notes

remove deprecated test functions from public API

don't add pure comments in call expressions

[Closes #14084]

don't add pure comments inside arrow functions

[Closes #13768]

prefix renamed extended classes (#13613)

[Closes #13613]

[Closes #11796]

@angular-devkit/build-webpack (0.800.0) Commit Description Notes

include entrypoints in emitted files

report emitted files

add a "build" builder

add API builder for dev server

add API builder for webpack

consider name when deduping emitted files

add dot to file extension in emitted files

check server address type before use

also split on multi modules and spaces

@angular-devkit/core (8.0.0) Commit Description Notes

make new workspace API public

implement workspace JSON reader/writer

Remove dep on chokidar

analytics interfaces and basic implementations

add workspace reader/writer core API

add factories for workspace

remove Log messages from Job API

jobs should re-log instead of forwarding

logger.log() should keep own metadata

export terminal capabilities

support console logger color customization

add a reuse JobStrategy

add a fallback registry

createJobFactory does not have to have options

properly replace an added value in workspace API

deprecate redundant isObservable function

remove unimplemented prompt priority

[Closes #14402]

handle async host exceptions for workspace isDirectory/isFile

NodeJSAsyncHost.isFile should check for a file

support writing an empty object workspace

host.delete() completes but never emits

[Closes #14235]

ignore undefined targets when adding a workspace project

ensure long workspace value changes are multiline

escape workspace json pointers

allow scoped names for workspace projects

add project type as a workspace special extension

correct workspace discovery

fix true schemas post transform step

remove static initialization using process object

Properly subscribe/unsubscribe to observables

@angular-devkit/schematics (8.0.0) Commit Description Notes

add support for analytics

support unicode character HTML element names (#13837)

support basic promise/async based rules (#13660)

support pnpm as a package manager option

deprecate synchronous testing methods

use rxjs version of isObservable

fully support async rules

add aliases to collection-schema.json

use `join` instead of normal string concatenation

[Closes #13654]

@ngtools/webpack (8.0.0) Commit Description Notes

remove importFactories option

support loadchildren string syntax in Ivy

redirect ngcc errors and warnings to webpack

reuse compiler host in webpack child compilations

add NGCC as part of the workflow

support import syntax for loadChildren with ViewEngine

add option to control lazy route discovery

support Angular 8

allow .svg files as templates

[Closes #10567]

import factory from original declaration file

[Closes #14399]

fixes ngcc error when project name is the same or partially the same as a module name

[Closes #14317]

log ngcc info messages (#14320)

[Closes #14194]

set correct peerDependencies for TypeScript and Angular Compiler CLI

replace bootstrap code under Ivy unless running in JIT mode

changes in non module code are not picked up when using barrel files

[Closes #13975]

replace resources should return class node when modified

don't invalidate cache after first run

`getCurrentDirectory` should not return a devkit path

don't load ngfactories for lazy routes with Ivy

provide a TS-like path to ngProgram.listLazyRoutes

[Closes #13531]

@schematics/schematics (0.800.0) Commit Description Notes

update jasmine to 3.3.1+

use correct collection.json path

@schematics/update (0.800.0) Commit Description Notes

show executing package during migrations

guard against null value for semver check

devkit (0.800.0) Commit Description Notes

make name required for devkit package schematics

@schematics/angular (8.0.0) Commit Description Notes

update scaffolding rxjs version to 6.5.1

drop @angular/http from dependencies

enable support for Chrome 41

update `karma` to `4.1.x`

add lazy module path fixer

add more information and browsers in browserlist

migrate existing ES5 projects to support differential loading

update several workspace dependencies

set workspace tsconfig target to es2015

stop adding `@angular/http` dependency when running universal schematic

add web worker schematics

remove ivy-ngcc postinstall script from new application

update to codelyzer 5

drop es6 from modern polyfills

tslint migration for 8

update to ng-packagr version 5

add type checking for protractor.conf.js file

[Closes #13958]

use more codelyzer rules

allow ember, ember-cli, vendor, app and test names

update workspace jasmine to 3.3.1+

JSON schema for service worker config

use esnext as the default TS module format

update minimum karma and tslint versions

change layout for root applications

relocate `ng g service-worker` files

rename `tsconfig.e2e.json` to `tsconfig.json`

change layout of e2e files

recommend plugins that John Papa recommends

rename experimentalIvy to enableIvy

Update rxjs to 6.4.0

scaffold new projects with angular packages version 8

remove `annotateForClosureCompiler` in libraries tsconfig (#13546)

add migration to update `web-animations-js` polyfill

[Closes #14518]

drop the worker alias

[Closes #14525]

handle newline after `@` of a decorator

[Closes #14490]

enable tsickle for library compilation

update or add module and target to non extended tsconfig

[Closes #14436]

polyfills migration leaving broken code in windows

[Closes #14443]

update zone.js to 0.9.1

differential loading migration should run only for projects using `@angular-devkit/build-angular:browser`

[Closes #14389]

tsconfig with comments breaks universal schematic

[Closes #14371]

remove old GoogleBot browserslist setting

[Closes #14364]

linting errors in AST utils spec

allow insertion when there are no occurrences

project name option in the library schematic

older projects are not migrated to support differential loading

[Closes #14321]

avoid tslint overhead for lazy module migration

reduce package installs for 8.0 migrations (#14324)

set CLI 8.0 codelyzer migration version to ^5.0.1

update zone.js version during CLI 8.0 migration

[Closes #14281]

normalize differing TS AST versions in lazy module migration

remove tsquery peer dependency warning

[Closes #14270]

avoid double header/comments in es6 polyfill migration

workaround bug in recorder/update

move and update existing `src/browserslist`

[Closes #14232]

align differential loading migration to browserslist template

fix paths when `newProjectRoot` is an empty string

[Closes #14108]

skip E2E projects when migrating browserslist

ensure Angular builders are migrated to latest versions

migrate TS module type to esnext

handle polyfill migration in non root applications

generate `tsconfig.worker.json` outside of the `src` folder

add `tsconfig.worker.json` to list of tsconfigs to lint

properly log data received in web worker snippet

set version 8 migration to execute for beta versions

minimal should not add `test` target

remove unused core-js dependency from new projects

buildRelativePath handles files in root

remove baseUrl from universal tsconfig

[Closes #13935]

change entry file name of the library schematic according to the kebab-case convention

reintroduce `.sass` as a supported file extention

[Closes #13739]

kebab case prefix causes lint errors in new directives

[Closes #13796]

default newProjectRoot to current directory

remove ViewEncapsulation from root component

remove extra comma in component schematic

use enableIvy as true

JsonUtils should respect indent

`findModuleFromOptions` not handling properly different casing in name

[Closes #13714]

undefined is used as newProjectRoot when none is set

[Closes #13703]

fix missing semicolons in extensions.json.template

add file extensions to style prompt

fixes issue that `ViewEncapsulation` is not being configured when provided

[Closes #13689]

respect the flag when we create a guard with schematics

Include bazel-out in .gitignore

[Closes #13636]

set restartOnFileChange to true in karma.conf templates

[Closes #13542]

e2e test fails strict TS config

update latest version of devkit

update typescript to 3.2.4 (#13554)

set cortrect file extention in config when using preprocessors (#13552)

[Closes #13550]

use baseUrl for default e2e test

remove leading comments when removing `core-js/es7/reflect` (#13528)

[Closes #13491]

@angular-devkit/architect-cli (0.800.0) Commit Description Notes

clear console and show logs

wait for last output of build

CLI tool to use new Architect API

fix paths to support Windows

remove any throttling of the progress bar


Note About Versioning

You might have noticed some versions have changed since the last release. We always had two channels for our packages; stable and experimental. For example, @angular/cli is stable, while @angular-devkit/build-angular is experimental. So far, we managed those versions independently of each others (7.3.x matches 0.13.x, while 8.0.0 matches 0.14.0).

From version 8.0.0 and upwards, we will start using the power of Mathematics for choosing the experimental packages versions. The formula is simple; "0." + (major * 100 + minor) + "." + patch. So, for example, the 8.0.0 release becomes the 0.800.0 version for experimental packages.

This allows us to better manage our experimental packages (they are always monotonic with time), and it allows users to know if they are not matching versions between their packages in their projects, without relying on looking up the npm registry or other sources. If a package version does not match the formula above, you might have mismatching packages.


Special Thanks

Charles Lyding, Alan Agius, Hans Larsen, Renovate Bot, Filipe Silva, Alan, Alex Eagle, Minko Gechev, Cédric Exbrayat, Keen Yee Liau, hawkgs, Judy Bogart, ManfredSteyer, WilliamKoza, Vikram Subramanian, mrmeku, hrocha16, Louis Larry, Captain Caius, Nikita Poltoratsky, Craig Spence, Sam Thorogood, Logan Mzz, Jason Miller, Andriy Pyvovarchuk, ukrukar, JiaLiPassion, Kara, Niyaz Akhmetov, Will, Olivier Combe, Emilio Martinez, Cyrille Tuzi, Mathias Raacke, mgechev, Rares Matei, Amadou Sall, cipchk, owenmecham, George Kalpakas, Luis Confraria, William KOZA, Andrey Chalkin, Stephen Fluin