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.
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 theprop-types
andcreate-react-app
packages. Given that norreact
norhighcharts
are, I assume this is an oversight?Also, they're duplicated - along with common code - in
ReactHighcharts
,ReactHighstock
,ReactHighmaps
, andRedrawOnPrint
. Which results in shipping a lot of duplicated code if we need to use more than one.Fixing the
prop-types
problem is simple, butcreate-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.