This is dependent on https://github.com/swimlane/ng2d3/issues/8
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
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