Code Monkey home page Code Monkey logo

Comments (7)

wbhob avatar wbhob commented on May 17, 2024 3

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

from ngx-charts.

jschwarty avatar jschwarty commented on May 17, 2024 2

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

from ngx-charts.

zvirja avatar zvirja commented on May 17, 2024 2

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.

from ngx-charts.

ocombe avatar ocombe commented on May 17, 2024 1

This is dependent on #8

from ngx-charts.

amcdnl avatar amcdnl commented on May 17, 2024

@jschwarty - can you provide a demo env?

from ngx-charts.

wbhob avatar wbhob commented on May 17, 2024

well #8 has been closed

from ngx-charts.

scott-wyatt avatar scott-wyatt commented on May 17, 2024

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

from ngx-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.