3
votes

According to this article, the only way to implement good server-side rendering with Angular 4's platform-server is to set up a custom webpack config after running ng eject on an angular cli project.

Maybe this question is naive of me, but is there any way to keep using the default cli webpack config files and also take advantage of server-side rendering?

I am a newb when it comes to webpack, so I prefer not to eject from the cli.

UPDATE:

This blog post is a really good resource. However, I am now waiting for the @angular/material library to be compatible with angular universal (It's not yet, but should be coming soon).

1

1 Answers

0
votes

Currently Angular-CLI don't support server-side rendering. You can take a look at https://github.com/angular/angular-cli/issues/1050 for more details. So it is waiting to support for Angular Universal as here.

Now you can use Universal-CLI that it is fork from Angular-CLI supporting Angular Universal.

Hope this help!