Currently, this script is importing the whole babel-polyfill https://github.com/Grsmto/simplebar/blob/0a7e1877b4f36862f45cb0471fd19811d243e1ae/src/simplebar.js#L5 which results in a 81.2 kb minified dist file.
IMO there are lots of unneeded polyfills in babel-polyfill package, it would be much better to import necessary polyfills only:
import 'core-js/fn/array/from';
...
What do you think about?
We are using babel-preset-env so unless I'm using it wrongly, it should not import every polyfills but only the ones required.
The script size seems big tho, I'll investigate.
Ref #112
babel-preset-env imports all polyfills that target environment requires. You might need babel-transform-runtime plugin to import only used polyfills, or wait for https://github.com/babel/babel-preset-env/issues/246 馃槂.
Edit: this issue could be resolved with [email protected], see https://github.com/babel/babel-preset-env/pull/241
Ahhhh damn :p
Thanks very much for this, seems like I rushed this pretty badly in the latest release.
I'll take a serious look at it! :)
Most helpful comment
Ahhhh damn :p
Thanks very much for this, seems like I rushed this pretty badly in the latest release.
I'll take a serious look at it! :)