3

I've created an angular application using the new Net Core 2.1 Angular template build in in Visual Studio 2017. This template uses a pure angular-cli setup in favor of the previous webpack config.

The template uses angular 5.2 so I upgraded it to 6 using the official update guide. After some additional tweaks like removing the "--extract-css" as described here, the application worked like a charm again.

For SEO purpose I wanted to activate SSR so I used the official guide provided by MS. This guide works when using Angular CLI 5 (used it before the migration) but I don't know how to do this with Angular CLI 6.

The ".angular-cli.json" has of course been replaced by the "angular.json" file which has another setup. So I am a bit puzzled as how to set this up.

My package.json looks like this:

{
 "name": "xxx",
 "version": "1.0.0",
 "private": true,
 "scripts": {
   "ng": "ng",
   "start": "ng serve",
   "build": "ng build",
   "test": "ng test",
   "lint": "ng lint",
   "e2e": "ng e2e"
 },
 ...
Beejee
  • 1,836
  • 2
  • 17
  • 31

1 Answers1

2

I found this topic on github which explains the actions needed to activate SSR for angular CLI 6 in combination with NET Core. This explains a lot and they will update the original info page soon.

Beejee
  • 1,836
  • 2
  • 17
  • 31