feat(@angular/build): add library builder - #34106
alan-agius4 wants to merge 8 commits into
Conversation
e9c43b0 to
67110b0
Compare
67110b0 to
5513da2
Compare
5513da2 to
b3ffd2d
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new library builder (@angular/build:library) designed to compile, bundle, and package Angular libraries in compliance with the Angular Package Format (APF). It includes features such as incremental compilation, watch mode, asset copying, secondary entry point resolution, and package.json generation. The review feedback highlights a few critical areas for improvement: ensuring the package name is updated in options when package.json changes in watch mode, optimizing startup by avoiding redundant reads of package.json, and capturing and propagating stylesheet compilation warnings to the user.
There was a problem hiding this comment.
Code Review
This pull request introduces a new library builder for Angular, enabling the compilation, bundling, and packaging of libraries in accordance with the Angular Package Format (APF). The changes include the core builder logic, a dependency graph scanner for entry points, an incremental compilation pipeline, and support for secondary entry points. My review highlights performance optimizations for the dependency predicate and file change detection logic, which are critical for maintaining build speed in larger projects.
7239409 to
4ee7685
Compare
5ef0ac4 to
b19ab2c
Compare
|
Thanks for putting together #34127 so quickly, @thekhegay! Having a concrete implementation to look at makes evaluating the ergonomics much easier, and the data on @dherges That is definitely a large part of it, but the speedup comes from several specific architectural changes beyond just removing the RxJS transform layer:
|
Aligning documentation of Angular Package Format (APF) with angular/angular-cli#34106 and ng-packagr/ng-packagr#3360
|
@alan-agius4 Understood on patterns, happy to leave #34127 parked until the builder itself lands. Meanwhile I ran the builder against ng-zorro-antd (105 entry points, same layout as ngwr: one folder per entry point with
No OOM on this one, on the default heap or the 14 GB one the repo sets. Watch memory matches ng-packagr because watch doesn't create the worker pool; the non-watch gap is 13 workers by default on a 14-core machine. Output matches closely: same 421 files, same 185 exports keys with every |
005e05e to
8c58c5e
Compare
Aligning documentation of Angular Package Format (APF) with angular/angular-cli#34106 and ng-packagr/ng-packagr#3360
Aligning documentation of Angular Package Format (APF) with angular/angular-cli#34106 and ng-packagr/ng-packagr#3360 (cherry picked from commit 0006391)
Aligning documentation of Angular Package Format (APF) with angular/angular-cli#34106 and ng-packagr/ng-packagr#3360 (cherry picked from commit 0006391)
2d09a68 to
c092604
Compare
Add a new native `@angular/build:library` builder providing a modern, high-performance compilation and packaging pipeline.
c092604 to
7928f11
Compare
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What is the current behavior?
Currently, there is no native
@angular/build:librarybuilder in@angular/build.Issue Number: N/A
What is the new behavior?
Add a new native
@angular/build:librarybuilder providing a modern, high-performance compilation and packaging pipeline.Does this PR introduce a breaking change?
Other information