fix(@angular/build): handle external @angular/ packages during SSR#29094
Merged
alan-agius4 merged 2 commits intoangular:mainfrom Dec 9, 2024
Merged
fix(@angular/build): handle external @angular/ packages during SSR#29094alan-agius4 merged 2 commits intoangular:mainfrom
@angular/ packages during SSR#29094alan-agius4 merged 2 commits intoangular:mainfrom
Conversation
99c9f1a to
ee15370
Compare
This commit introduces `ngServerMode` to ensure proper handling of external `@angular/` packages when they are used as externals during server-side rendering (SSR). Closes: angular#29092
ee15370 to
e2d52fb
Compare
klerick
reviewed
Dec 9, 2024
| const source = await javascriptTransformer.transformFile(filePath); | ||
| let source = await javascriptTransformer.transformFile(filePath); | ||
|
|
||
| if (filePath.includes('@angular/')) { |
There was a problem hiding this comment.
What happens if the name does not include '@angular/'?
Collaborator
Author
There was a problem hiding this comment.
The ngServerMode is not added. And the resolved module will be returned with the standard transformations.
clydin
reviewed
Dec 9, 2024
packages/angular/build/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.ts
Outdated
Show resolved
Hide resolved
…ng SSR Co-authored-by: Charles <19598772+clydin@users.noreply.github.com>
clydin
approved these changes
Dec 9, 2024
Collaborator
Author
|
The changes were merged into the following branches: main, 19.0.x |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This commit introduces
ngServerModeto ensure proper handling of external@angular/packages when they are used as externals during server-side rendering (SSR).Closes: #29092