tsur / canvasjs

37 stars 40 forks source link

Doesn't work with CRA #18

Open T-101 opened 4 years ago

T-101 commented 4 years ago

Installing this package to a create-react-app project will yield a problem.

SyntaxError: ./node_modules/canvasjs/src/charts/index.js: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (1:8):

> 1 | export SplineChart from '../charts/spline';
    |        ^
  2 | export ColumnChart from '../charts/column';
  3 | export StackedColumnChart from '../charts/stacked_column';
  4 | export StackedColumn100Chart from '../charts/stacked_column_100';

Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation.

Installing that plugin is apparently not possible without ejecting, which on it's own is usually not viable

jklepatch commented 4 years ago

I have tried this solution without ejecting, and it doesn't work.

I wonder if this babel plugin has to be used in the codebase of canvasjs instead?

aZolo77 commented 4 years ago

Same problem.. Did u solve it?

T-101 commented 4 years ago

yeah, I changed to recharts

aZolo77 commented 4 years ago

o, thanks, man! is it free? right?