-
Notifications
You must be signed in to change notification settings - Fork 264
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
Using only specific loader type without importing whole spinner #23
Comments
Would also be interested in this! Currently react-spinners is 9% of our small apps total bundle size. Love the spinners though! RingLoader is awesome :) |
@archansel @ThomasBem, I ran a quick test, looks you like can import just one.
Trying to see how I can remove the
The file sizes are the size after gzip. I used Can you guys give that a try and see if the bundle size is reduced? |
@davidhu2000 Figured I would chime in to confirm this worked on my end. I used I'm only using BarLoader and PulseLoader |
@GuillaumeCisco Just merged in your PR, but looks like single loader import isn't working. I'm looking at possible solutions, not sure why. I had to deprecate |
I just published a patch 0.4.1 that removes the single loader import from the readme. So hopefully very few people uses 0.4.0. |
looks like the issue is you need to |
Dist folder should not exist. Check the way the build work.
…--
Guillaume Cisco
Le sam. 11 août 2018 à 06:26, David Hu <notifications@github.com> a écrit :
looks like the issue is you need to import BarLoader from
'react-spinners/dist/BarLoader';
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGgrEjTGOJn2Km37LoVXvGiycTuCZTkks5uPlzbgaJpZM4ROHlh>
.
|
This is fixed in |
We came back to our app recently where we use one of your spinners as our main loading animation. Updated to 0.4.3 and changed the import like you said and now our bundle size dropped by 50KB. Just wanted to say thanks! 👍 |
@davidhu2000 Can't use this import method with typescript. I've got error: |
hmm, @alexmironof can you open a new issue? This feels like a different issue that the current issue. |
Hi, is there any way to load only one specific loader without the whole spinner being bundled. Something like what
lodash
did, for example:The text was updated successfully, but these errors were encountered: