Repository navigation
fix(@angular/build): align lazy route entry names with workspace root for SSR modulepreload - #34373
Open
alan-agius4 wants to merge 1 commit into
Open
alan-agius4 wants to merge 1 commit into
alan-agius4 wants to merge 1 commit into
Conversation
… 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
1 task
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.
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.
Cherry-pick of #34372 to 22.2.x