Repository navigation
fix(@angular/build): align lazy route entry names with workspace root for SSR modulepreload - #34373
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for overriding the basePath compiler option in the Angular build tools. It updates CompilerOptionOverrides and transformCompilerOptions to accept and apply basePath, and integrates this into the esbuild compiler plugin using build.initialOptions.absWorkingDir. Additionally, test coverage is added for these changes and chunk optimization verification is updated. Feedback suggests defaulting basePath to process.cwd() in the compiler plugin if absWorkingDir is undefined, preventing potential misalignment between esbuild and the Angular compiler.
… for SSR modulepreload Override `compilerOptions.basePath` with `build.initialOptions.absWorkingDir` when initializing the Angular compilation so `lazyRoutesTransformer` computes `ɵentryName` relative to the workspace root rather than the tsconfig directory. This matches the workspace-relative keys in `entryPointToBrowserMapping` used for SSR `modulepreload` link generation when the application's `tsconfig` is not located at the workspace root. Closes angular#34369
…ce root for SSR modulepreload
32c561b to
b89fe32
Compare
|
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. |
Cherry-pick of #34372 to 22.2.x