A wrapper around @ngtools/webpack that adds hooks into the Angular AOT compilation process and supports library mode compilation for Angular libraries, enabling resource inlining (SCSS, LESS) and webpack loader chains. Current version 4.1.2 targets Angular 5 and requires @angular/compiler-cli ^5.0.0 and @ngtools/webpack ^1.8.0. The key differentiator from @ngtools/webpack is its library mode for publishing Angular packages, its extensible hook system, and the ability to use a custom TypeScript loader for JIT mode. It is now in maintenance mode; users are generally advised to use @ngtools/webpack directly for application builds unless library compilation is needed. Release cadence is low; last release was 2018.
npm install ngc-webpackVerified import paths — ran on the pinned version, not inferred.
Basic webpack configuration using NgcWebpackPlugin as a replacement for @ngtools/webpack AngularWebpackPlugin.
Use @ngtools/webpack loader exclusively.
Consider using Angular CLI's library generation or ng-packagr.
Do not use with Angular 9+; use @ngtools/webpack with Ivy at your own risk.
Run npm install @angular/compiler-cli@^5.0.0
Install TypeScript 2.4.x with npm install typescript@2.4
Use import { NgcWebpackPlugin } from 'ngc-webpack'; or const { NgcWebpackPlugin } = require('ngc-webpack');