feat(@angular/build): add library builder - #34106
alan-agius4 wants to merge 1 commit 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
9f149cd to
2b8932e
Compare
|
Hello! @alan-agius4 thank you for your great job. A few questions (cause i'm planning to test new builder):
If it will help: happy to report back what brakes. ngwr using 227 entry points, per-entry-point sass, harnesses in secondary entry points |
2b8932e to
e1fa579
Compare
|
@thekhegay, thanks for the questions! Here are the details:
Testing on a project with 227 entry points, per-entry Sass, and secondary test harnesses would be fantastic and extremely helpful please feel free to share any issues you run into! |
|
@alan-agius4 out of scope of this PR, just flagging it: about entryPoints map. ngwr has 228 entry points (99 of them nested, like The part that worries me isn't size - adding an entry point becomes two steps instead of one, and forgetting second fails silently - entry point just is not published. Would a glob value be on the table ( Sorry for dropping this here - discussions are off in this repor and i wasnt sure where question belongs. happy to move it to and issue if you'd rather keep this PR clean P.S. I have started building ngwr against this branch and running tests against output. If i hit anything i ll file if as an issue with reproductin rather than comment in this PR. |
Add a new native `@angular/build:library` builder providing a modern, high-performance compilation and packaging pipeline.
e1fa579 to
4403612
Compare
|
I actually just tested this against
To address your questions:
Please feel free to open issues with any reproductions or edge cases you encounter while testing your feedback is greatly appreciated! |
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