react-chartjs icon indicating copy to clipboard operation
react-chartjs copied to clipboard

export `ReactChartJs`

Open CodePlayer7 opened this issue 8 years ago • 4 comments

exports ReactChartJs rather than react-chartjs so we can simply call ReactChartJs rather than window['react-chartjs']

CodePlayer7 avatar Dec 28 '16 04:12 CodePlayer7

@CallMeXYZ, can you provide more details on this issue ?

Jareechang avatar Jan 14 '18 20:01 Jareechang

when importing this project by url or cdn, we need to call window['react-chartjs'] to get the reference. If exporting as ReactChartJs then we can simply call ReactChartJs

CodePlayer7 avatar Jan 16 '18 01:01 CodePlayer7

This seems like a small enough improvement one could submit a PR for. Would one change this file? https://github.com/reactjs/react-chartjs/blob/master/index.js

morenoh149 avatar Mar 06 '18 18:03 morenoh149

Hi Everyone, I believe this is specified in webpack and not in the source code itself. I am happy to take PRs.

That being said, my only concern with this request is that it may break other people's projects using window['react-chartjs'] if we change it. Unfortunately, I am a little hesitant with this change.

Please see:

Helpful resource:

Webpack >2.0 Doc

Jareechang avatar Mar 06 '18 19:03 Jareechang