nx-examples icon indicating copy to clipboard operation
nx-examples copied to clipboard

Request an example for official Angular SSR setup

Open maxisam opened this issue 4 years ago • 5 comments

First of all, this one doesn't work.

https://blog.nrwl.io/nx-workspace-schematics-server-side-rendering-ssr-with-angular-universal-afc04ead55

It would be great to have SSR in this example, so we can always keep track on it.

Most of the examples I have seen put SSR within the angular app. It seems like it is the only way. However, it seems like against the whole nx architecture.

Here is the setup having ssr inside the angular app https://github.com/jared-christensen/nx-angular-universal

However, it doesnt work in NX v12. It works in NX v11

https://github.com/jared-christensen/nx-angular-universal/issues/1

maxisam avatar May 31 '21 11:05 maxisam

I second this request, there are so many half-baked, out-of-date guides out there that it can lead to a ton of confusion.

s4m0r4m4 avatar Dec 15 '21 03:12 s4m0r4m4

This would be great. Can this be considered maybe?

ciriousjoker avatar Jul 23 '22 22:07 ciriousjoker

hey, it's still relevant. does anybody able to perform an example? spent over 2 hours to find and try something, no results

monkeycatdog avatar Dec 19 '22 18:12 monkeycatdog

I'm using this generator https://nx.dev/packages/angular/generators/setup-ssr to generate Angular SSR file. Is this the official way?

nx generate setup-ssr project-name

shaiful-dynasty avatar Jan 05 '23 13:01 shaiful-dynasty

After the update to nx16 in our company we have the problem that all our release-pipelines fail because neither the server artifacts nor the prerendered build-artifacts get build .. the funny thing is that the build-pipelines output nothing strange .. the error occurs when the pipeline hits existing cashed artifacts and the the @nx/angular:webpack-browser executor even reports that the build was successfull .. but the artifacts in the dist folder are missing

Please also explain more in detail what @nx/angular:setup-ssr is supposed to do (which files it creates, touches and how they are modified)

jackmorizo avatar Aug 08 '23 11:08 jackmorizo