Angular CLI-based template: Newer template does not support all packages that old one did when using SSR #1435
Description
Based on my comment in #1288
Scenario:
I created my project using the default VS2017 angular SPA template (used webpack). I used SSR and had a dependency on @ ng-bootstrap/ng-bootstrap. After upgrading to the new Angular Cli-based template, I can not use SSR.
The reason is that the library contains .js files (example: rating.js ) with import statements unsupported by node:
import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter, TemplateRef, ContentChild, forwardRef, ChangeDetectorRef } from '@angular/core';
Previously, I am guessing that the library would be bundled up by webpack and these statements would be rewritten. However since Angular Cli is not able to bundle the dependencies, the import statements remain and SSR fails because node can not execute these import statements.
Therefore, the new template does not support all the libraries that the old one did within the scope of server side rendering.