New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New dependency react-spinners increases build size #202
Comments
It appears that all spinners are included in the resulting build. It's just the example. The downside is that the examples are not excluded from the NPM package. |
I know, that this is just the example. But I do see about the same size increase in a production app, that tried to use the newer |
Ah, that is awful. It seems that it is hard to import a single spinner from react-spinners using rollup without using code like |
Perhaps there is a way to remove react-spinners as a dependency and use it in your own app, so its only in the examples app. @mkalygin is that at all possible? Then at some point we should separate out the demos and have a simpler example in the build and the more advanced/detailed ones on the github site. No need for the user to have to download an entire website with the package. |
Wait for jossmac/react-images#202 to be resolved.
@jossmac @neptunian I think it's possible. Actually it already supports custom spinners. So we can safely remove the What do you think? I'll be able to implement this. Or maybe I could help with the v1.0 release. |
Not sure when v1 is going to be ready so maybe best to take care of it now. I'm okay with it being removed and only existing as documentation. Ideally i'd like to have the website separated and this included, but for now, perhaps its best to keep it light. |
@neptunian sounds good, I'll be able to solve it this weekend. |
I've removed |
Thanks to everyone involved fixing this! 👏 |
I tried out
react-images
in version0.5.15
and0.5.16
. Compared to0.5.14
the resulting bundle size increase alot, adding ~90 kb of uglified, but not-gzipped payload.One way to measure it, is this way:
Steps to reproduce the behavior:
yarn webpack --progress -p
Expected behavior:
app.js
should not be too big (ideally around ~190 kb, as with 3d48f47)Actual behavior:
app.js
is quite big (currently ~277 kb, as with 7f229b1)It appears, that the biggest difference between those versions is #187. That PR added a new dependency to http://www.davidhu.io/react-spinners/.
The text was updated successfully, but these errors were encountered: