Repository navigation
fix(@angular/build): enforce library compilerOptions and skip app-only target warning - #34437
Merged
alan-agius4 merged 6 commits intoOct 20, 2026
Merged
Conversation
….tsbuildinfo emit Ensure library compilations explicitly set `noEmit: false`, `emitDeclarationOnly: false`, and `emitDecoratorMetadata: false` in `transformCompilerOptions` so that configurations extending a root `tsconfig.json` with `noEmit` or `emitDeclarationOnly` still emit both JavaScript and declaration files. Additionally, skip the application-specific `target < ES2022` Browserslist warning and `useDefineForClassFields = false` fallback when compiling libraries, and avoid serializing and writing on-disk `.tsbuildinfo` files during library builds since library outputs are emitted into in-memory maps on cold builds and watch rebuilds reuse the in-memory `BuilderProgram` directly.
…unused .tsbuildinfo emit
…unused .tsbuildinfo emit
alan-agius4
marked this pull request as ready for review
October 20, 2026 11:21
There was a problem hiding this comment.
Code Review
This pull request updates the compiler options transformation logic for Angular libraries. Specifically, it ensures that when building a library, options such as noEmit, emitDeclarationOnly, and emitDecoratorMetadata are explicitly overridden to false to ensure proper generation of both JavaScript and declaration files. Additionally, it skips the application-only target warning for libraries. Unit and behavior tests have been added to verify these behaviors. I have no feedback to provide as there are no review comments.
…unused .tsbuildinfo emit
…unused .tsbuildinfo emit
clydin
approved these changes
Oct 20, 2026
…unused .tsbuildinfo emit
Collaborator
Author
|
This PR was merged into the repository. The changes were merged into the following branches:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ensure library compilations explicitly set
noEmit: falseandemitDeclarationOnly: falseintransformCompilerOptionsso that configurations extending a roottsconfig.jsonwithnoEmitoremitDeclarationOnlystill emit both JavaScript and declaration files.Additionally, apply library
compilerOptionsoverrides before thetarget < ES2022check so the application-specific Browserslist warning anduseDefineForClassFields = falsefallback are skipped when compiling libraries.