kirjs / react-highcharts

React wrapper for Highcharts library

Home Page:http://kirjs.github.io/react-highcharts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimization: Don't bundle prop-types/create-react-app

ephys opened this issue · comments

commented

I was wondering why my Stats bundle was so massive in production, and the reason seems (in part) to be that the dist version of react-highcharts bundles the prop-types and create-react-app packages.
Given that nor react nor highcharts are, I assume this is an oversight?

Also, they're duplicated - along with common code - in ReactHighcharts, ReactHighstock, ReactHighmaps, and RedrawOnPrint. Which results in shipping a lot of duplicated code if we need to use more than one.

Fixing the prop-types problem is simple, but create-react-app would either require declaring it as a dependency or rewriting your classes & transpiling them using babel.

For the duplicated common code, I am unsure how it would be done.

I can write a PR to optimize this library as much as I can if you're interested.

16 release, I removed all dependencies in ReactHighcharts, ReactHighstock, ReactHighmaps and used UglifyJsPlugin for Minification code.
Thanks for your feedback.