Integration with Angular
Angular builds and tests compile through the Angular compiler plugin, not plain tsc. Forger ships a ready-made Webpack patch that injects tsconfig-declared transformers into the Angular compilation.
How it works
Forger's bundled webpack.config hooks the AngularWebpackPlugin and prepends every transformer declared in compilerOptions.plugins to the plugin's before transformer chain. So the single source of truth is your tsconfig*.json:
1. Install dependencies
2. Register the webpack config
Point the Angular builder at Forger's shipped config through the webpackConfig option — in angular.json for the affected targets:
Apply the same override to every target that must forge: build, test (Karma), and, if specs are compiled there, serve.
3. Spec files
For spec compilation, either:
run tests through Jest with ts-jest — the recommended Angular setup for Forger; follow Integration with Jest, or
keep Karma/Webpack and let the webpack patch above transform the specs as part of the bundle.
What to check when it "returns undefined"
The
pluginsentry is in the tsconfig that the affected target actually uses (tsconfig.app.json/tsconfig.spec.json— they extend different bases).The
webpackConfigoverride is present on the target being executed.ts-patchis installed — the Angular plugin path resolves the transformer itself, but ts-patch keeps compiler behavior consistent across build flavors.
See Caveats for the general checklist.