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
* feat: update plugin + demo to ng17
* chore: delete "advanced-routing" example
* chore: reintroduce old demo contents
* feat: also exclude prerendered routes
* chore: delete one more file
* fix: prettier
* chore: update engine
* fix: validate angular version
* fix: install package locally
* fix: add npm i for package to fix nf build
* fix: make build
* fix: custom ignore command
* chore: update logo
* fix: windows doesnt understand #
* chore: update readme
* fix: update release-please statements
* chore: replace commonmodule with v17 builtins
* feat: inject request/context
* fix: update eslint
* fix: license, author
* chore: comment about polyfill.mjs
* fix: ensure ts imports are posix
* chore: fail plugin instead of build
* fix: skip instead of failing
* fix: base64-encode html
* fix: use package name and version for generator
* fix: use require.resolve to find angular version
* feat: detect old version of plugin
* Revert manual version bump
* fix: detect when no SSR was set up
* fix: until we found a way to run edge functions during dev, remove them
* fix: make edge function run locally
* chore: note down limitation about netlify serve
* fix: update project name in code snippet
This build plugin is a utility for supporting Angular Universal on Netlify.
14
+
This build plugin implements Angular Support on Netlify.
15
15
16
16
## Table of Contents
17
17
18
18
-[Installation and Configuration](#installation-and-configuration)
19
+
-[Accessing `Request` and `Context` during Server-Side Rendering](#accessing-request-and-context-during-server-side-rendering)
19
20
-[CLI Usage](#cli-usage)
20
-
-[Caveats](#caveats)
21
21
-[Getting Help](#getting-help)
22
22
-[Contributing](#contributing)
23
23
-[License](#license)
24
24
25
25
## Installation and Configuration
26
26
27
+
Netlify automatically detects Angular projects and sets up the latest version of this plugin. There's no further configuration needed from Netlify users.
28
+
27
29
### Manual Installation
28
30
31
+
If you need to pin down this plugin to a fixed version, install it manually.
32
+
29
33
Create a `netlify.toml` in the root of your project. Your file should include the plugins section below:
30
34
31
35
```toml
32
-
[build]
33
-
command = "ng build --configuration production && ng run {projectName}:serverless:production"
34
-
publish = "dist/{projectName}/browser"
35
-
36
36
[[plugins]]
37
37
package = "@netlify/plugin-angular-universal"
38
38
```
39
39
40
-
If you'd like to install this plugin at a fixed version, install it via your package manager:
1. It will modify your angular.json to add a `serverless` project configuration.
64
-
2. It will add `serverless.ts` and `tsconfig.serverless.json` files.
58
+
exportclassFooComponent {
65
59
66
-
It is up to you whether to commit these changes to your project. If the plugin makes updates to these files or configurations, it will overwrite what you'd previously committed, and you can commit the new updates. Otherwise, you can stash and ignore them.
console.log(`Rendering Foo for path ${request?.url} from location ${context?.geo?.city}`)
66
+
// ...
67
+
}
68
+
69
+
}
70
+
```
67
71
68
-
### Workflow
72
+
Keep in mind that these will not be available on the client-side or during [prerendering](https://angular.dev/guide/prerendering#prerendering-parameterized-routes).
69
73
70
-
If you'd like to build and deploy your project using the
71
-
[Netlify CLI](https://docs.netlify.com/cli/get-started/), we recommend this
72
-
workflow to manage git tracking plugin-generated files:
74
+
To test this in local development, run your Angular project using `netlify serve`:
73
75
74
-
1. Make sure all your project's files are committed before running a build with
75
-
the CLI
76
-
2. Run any number of builds and deploys freely (i.e. `netlify build`,
0 commit comments