feat: migrate to angular v20 and update Angular server-side rendering setup - #15
Merged
Conversation
… setup - Created a new pnpm workspace configuration file to manage dependencies. - Updated server configuration to use `withRoutes` for server-side rendering. - Enhanced app configuration with new providers for error handling and change detection. - Introduced a new server routes file for handling all requests with server rendering. - Removed the old index file to streamline exports. - Refactored main server file to utilize Angular's new Node app engine for improved request handling.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the Angular application from version 18 to version 20, modernizing the SSR setup and adopting Angular's zoneless change detection strategy.
- Updated Angular and related packages from v18.x to v20.x
- Migrated SSR implementation to use the new
AngularNodeAppEngineAPI - Removed zone.js dependency in favor of zoneless change detection
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated all Angular packages and dependencies to v20, removed zone.js, adjusted scripts to use shorthand flags |
| src/server.ts | Refactored server setup to use new AngularNodeAppEngine API, replaced CommonEngine with simplified SSR handling |
| src/main.server.ts | Updated bootstrap function to accept BootstrapContext and use renamed config export |
| src/app/app.config.ts | Added zoneless change detection provider, event replay hydration, and removed animations provider |
| src/app/app.config.server.ts | Migrated to use provideServerRendering from @angular/ssr with server routes configuration |
| src/app/app.routes.server.ts | Added new server routes configuration file with catch-all route |
| src/app/index.ts | Removed file that previously exported app components and configs |
| angular.json | Updated builder references from @angular-devkit/build-angular to @angular/build, removed prerender option, added outputMode, removed zone.js polyfill |
| pnpm-workspace.yaml | Added new workspace configuration with build dependencies |
| llms.txt | Added new documentation file with Angular learning resources |
| .prettierrc | Removed embeddedLanguageFormatting option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… error handling in server.ts
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.
withRoutesfor server-side rendering.