Packaging Angular
summary
Package format requires publish .d.ts and metadata.json so AOT compilation works, and authors must use ngc from @angular/compiler-cli not plain tsc. Build with module: es2015 and target es5 for source, set angularCompilerOptions like strictMetadataEmit and skipTemplateCodegen, add flatModuleOutFile/flatModuleId, then run rollup to produce a flattened ESM. Inline templates/styles if possible, avoid a kitchen‑sink NgModule, and ship ES2015 and ES5 builds (enable annotateForClosureCompiler for Closure optimizations).
AI-written summary · about
chapters (8)
- 0:00Start
- 1:18A What do App Devs Want?
- 2:20A AOT Support Requirements
- 3:52A NGC Process
- 4:38A Requirements for sconfig.json
- 12:09A Strategy
- 21:04A Advanced Optimizations
- 26:12A Summary
related talks
30mCreate and publish Angular libs like a Pro
16mLet's plant our Angular Tree
28mCreate & Publish Angular Libs like a PRO
24mPackages for Angular
27mDemystifying Ahead-Of-Time compilation in Angular
26mAngular Libraries: from zero to Open Source
44mRockin’ in the Angular World
01h 13mInternals of the Angular CLI
