Repository navigation
refactor(@angular/build): support library compilation in AngularCompilation - #34174
alan-agius4 merged 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for compiling Angular libraries by adding a buildType parameter ('application' or 'library') across the compilation pipeline and adjusting compiler options and emit behavior accordingly. The feedback highlights an issue in parallel-worker.ts where the returned compilerOptions object is missing the newly added declarationMap property, which would prevent the main thread from receiving the correct configuration during parallel compilation.
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds library compilation support (
buildType: 'application' | 'library') toAngularCompilation,TypeScriptCompilation,AotCompilation, andtransformCompilerOptions:declarationMap,compilationMode, andpathsoverrides inCompilerOptionOverrides.declaration,importHelpers,Bundlermodule resolution, externalsourceMap, and TypeScript transpilation) whenbuildType === 'library'.SourceFile(.js,.d.ts,.d.ts.map) inAotCompilation.emitAffectedFiles()and skip application-only transformers (replaceBootstrap,webWorkerTransform,lazyRoutesTransformer) during library emission.