Ngx-charts: Server-side rendering

Created on 11 Aug 2016  路  7Comments  路  Source: swimlane/ngx-charts

New Feature High

Most helpful comment

I can confirm that this is still an issue. @zvirja 's fix works, but it is a hack and we need a more permanent solution. This seems to be an issue with how the library is packaged, targeting ES5. Complying with angular package format should solve this issue.

cc @scott-wyatt

All 7 comments

Is this still in the works? Getting the following error when trying to use a component in code that is run through server side rendering:

import { Input, Component, ElementRef, ViewEncapsulation, HostListener, ViewChild, HostBinding, Renderer } from '@angular/core';
^^^^^^
SyntaxError: Unexpected token import

@jschwarty - can you provide a demo env?

As a workaround you can add the following code to your package.json:

{
  "scripts": {
    "postinstall": "npm run fix-ngx-charts",
    "fix-ngx-charts": "babel node_modules/@swimlane/ngx-charts -d node_modules/@swimlane/ngx-charts --presets es2015",
  }
}

It helped on my local environment.

I can confirm that this is still an issue. @zvirja 's fix works, but it is a hack and we need a more permanent solution. This seems to be an issue with how the library is packaged, targeting ES5. Complying with angular package format should solve this issue.

cc @scott-wyatt

well #8 has been closed

@maintainers, would you accept a PR with Ng-packagr? Related to #1211

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kakalos12 picture kakalos12  路  4Comments

emeric0101 picture emeric0101  路  3Comments

ronybarbosa picture ronybarbosa  路  3Comments

amcdnl picture amcdnl  路  4Comments

stephanrauh picture stephanrauh  路  4Comments