Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Angular CLI-based template: Newer template does not support all packages that old one did when using SSR #1435

Closed
@andrewjsaid

Description

@andrewjsaid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions