Skip to content

build(angular): use partial compilation for published angular library #6636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions packages/angular/tsconfig.ngc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true,
// As per Angular 10, the recommendation from the library creation guide
// is to disable compilation for the Ivy rendering engine in production builds
// to ensure compatibility with Angular 10.
// For Angular 11-13 applications, ngcc and the Angular linker convert the compiled JS
// at application compile time into an Ivy-compatible version which is then further used in
// the build process. This ensures compatibility with newer Angular versions than the one
// that was used to initially compile the library (Angular 10 in our case).
"enableIvy": false
// Angular has introduced a partial compilation mode that allows for publishing libraries in a partially Ivy compiled
// state. Partial compilation is meant for published libraries so that any application can still use it but already
// has some preprocessing done on it and is not tied to any specific Angular version.
// {@link https://angular.io/guide/angular-package-format#partial-compilation}
"compilationMode": "partial"
}
}