You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: add angular@19 test fixture without prerendering and ssr
* chore: add angular@19 test fixture with prerendering and ssr using stable CommonEngine
* chore: add angular@19 test fixture with prerendering and ssr using Developer Preview App Engine
* chore: add scripts for installing new fixture dependencies
* test: add test for version validation when angular@19 is used
* test: add test for version validation when angular deps are missing
* chore: add entire .netlify dirs to .gitignore
* test: add initial (failing) build tests for Angular 19 fixtures
* refactor: split reading angular version out to separate helper function
* fix: handle prerendered-routes.json shape in Angular 19
* chore: add runtime to new fixture dependencies
* chore: upgrade demo to Angular 19
* fix: hopefully initial working demo deployment using CommonEngine
* test: check if process import is result of using default server.ts
* test: fix used fixture dir in one of tests
* fix: only patch deno method in Deno env
* fix: try/catch deno.readFile patching to avoid potential fatal errors
* chore: upgrade @netlify/build
* test: update assertion for changed hashes after update
* Revert "test: check if process import is result of using default server.ts"
This reverts commit 8a7a7cb.
* fix: add engine name to 'not supported' error message
* refactor: simplify user code
* test: remove dashboard from expected excluded paths as it's now server rendered
* test: adjust test setup to not be impacted by angular-runtime devDeps
* chore: adjust eslint directive after adding @angular/ssr dev dep
* chore: upgrade node types (for before/after from node:test)
* fix: workaround type problem for now
* fix: automatically set Netlify compatible request handler using CommonEngine
* fix: support AppEngine
* test: update new test fixtures to rc.1
* fix: apply headers for prerendered routes
* fix: swap original server.ts back after build or failure
* fix: remove @android/ssr from dev and peerDeps
* chore(demo): migrate default server.ts to angular@19
* fix: update disabled rule after removing @angular/ssr devDep
* fix: lint
* chore: sync lock files
* docs: update readme for angular@19
* docs: update readme toc
* fix: re-add @ts-expect-error for app engine until angular types are adjusted
* chore: remove outdated TODOs
* chore: update jsdocs
* chore: upgrade to most recent RCs
* test: update assertion after package bump
* feat: initial boilerplate and tooling to start matching server.ts to known variants
* feat: only autoswap for known module content, otherwise fail build with actionable error
* fix: now that we require default or netlify compatible server.ts - update demo site
* chore: drop unuseful comment
* fix: attempt to normalize content for signature so crlf endlines are treated as lf
@@ -76,10 +78,71 @@ To test this in local development, run your Angular project using `netlify serve
76
78
```sh
77
79
netlify serve
78
80
```
81
+
### App Engine Developer Preview usage with Angular@19
79
82
80
-
## Limitations
83
+
If you opt into the App Engine Developer Preview accessing `Request` and `Context` objects is streamlined. Instead of custom Netlify prefixed providers, you should use the standardized injection tokens for those provided by `@angular/ssr` instead:
81
84
82
-
- The [`server.ts` file](https://angular.dev/guide/ssr#configure-server-side-rendering) that's part of the Angular scaffolding is meant for deploying to a VM, and is not compatible with this Netlify build plugin. If you applied changes to that file, you'll need to replicate them in an Edge Function. See (#135)[https://github.com/netlify/angular-runtime/issues/135] for an example.
85
+
```diff
86
+
+import { REQUEST, REQUEST_CONTEXT } from '@angular/ssr/tokens'
87
+
import type { Context } from "@netlify/edge-functions"
console.log(`Rendering Foo for path ${request?.url} from location ${context?.geo?.city}`)
99
+
// ...
100
+
}
101
+
102
+
}
103
+
```
104
+
105
+
## Customizing request handling
106
+
107
+
Starting with Angular@19. The build plugin makes use of `server.ts` file to handle requests. The default Angular scaffolding does generate incompatible code for Netlify so build plugin will swap it for compatible `server.ts` file for you automatically if it detects default one being used. If you need to customize the request handling, you can do so by copying one of code snippets below to your `server.ts` file.
108
+
109
+
If you did not opt into the App Engine Developer Preview:
The [`server.ts` file](https://angular.dev/guide/ssr#configure-server-side-rendering) that's part of the Angular scaffolding is meant for deploying to a VM, and is not compatible with this Netlify build plugin for Angular@17 and Angular@18. If you applied changes to that file, you'll need to replicate them in an Edge Function. See (#135)[https://github.com/netlify/angular-runtime/issues/135] for an example.
0 commit comments