fix: detect @angular/platform-server to determine if Angular project uses SSR#10364
Open
swseverance wants to merge 3 commits intofirebase:mainfrom
Open
fix: detect @angular/platform-server to determine if Angular project uses SSR#10364swseverance wants to merge 3 commits intofirebase:mainfrom
swseverance wants to merge 3 commits intofirebase:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Angular framework discovery logic to detect SSR support by checking for the @angular/ssr dependency. While this correctly identifies Angular 17+ projects, the reviewer pointed out that it misses older versions (16 and below) that rely on @angular/platform-server. To avoid regressions where older SSR projects are incorrectly identified as static, it is recommended to check for @angular/platform-server instead, as it is the core dependency for SSR across all Angular versions.
annajowang
approved these changes
Apr 16, 2026
Contributor
annajowang
left a comment
There was a problem hiding this comment.
lgtm once review comments are addressed
Author
|
@annajowang I made the suggested changes and force pushed. Thank you |
12fbb65 to
23d4859
Compare
…uses SSR Previously, Angular's discover() always returned mayWantBackend: true, causing the SSR warning to appear even for SPA-only Angular projects. Now checks for the presence of @angular/platform-server in installed dependencies. Resolves firebase#10362
23d4859 to
00a93e2
Compare
leoortizz
approved these changes
Apr 16, 2026
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.
Per #10362 a "SSR warning" message appears when performing
firebase init hostingin Angular workspaces that do not use SSR. Now, thediscoverfunction for the Angular framework checks for the presence of @angular/platform-server in installed dependencies.Description
This fix will prevent the following warning from being displayed in Angular workspaces that have no dependencies on @angular/ssr:
I know personally the first time I saw the warning message (in my codebase with no SSR) it made me think I had incorrectly initialized my Angular workspace to in fact use SSR.
Scenarios Tested
Scenario 1: SSR
Scenario 2: No SSR
Sample Commands
N/A