@nx/angular:setup-ssr
Create the additional configuration required to enable SSR via Angular Universal for an Angular application.
Monorepo World: October 7, 2024Monorepo World: October 7, 2024Join us!
Create the additional configuration required to enable SSR via Angular Universal for an Angular application.
1nx generate setup-ssr ...
2
By default, Nx will search for setup-ssr
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/angular:setup-ssr ...
2
Show what will be generated without writing to disk:
1nx g setup-ssr ... --dry-run
2
The name of the application to generate the Angular Universal configuration for.
Set up Hydration for the SSR application. It defaults to true
for Angular versions >= 17.0.0. Otherwise, it defaults to false
.
main.server.ts
Format: path
The name of the main entry-point file.
app.server.module.ts
Format: path
The name of the root module file
AppServerModule
The name of the root module class.
server.ts
The name of the Express server file.
4000
The port for the Express server.
Use Standalone Components to bootstrap SSR.
Skip formatting the workspace after the generator completes.
false
Do not add dependencies to package.json
.
serverApp
Format: html-selector
The appId
to use with withServerTransition
.
This is deprecated and ignored since Angular 16 and not supported since Angular 17.
Join us live for exciting talks on developer tooling and monorepos! Catch the action on YouTube and join the conversation on Discord!