Code Monkey home page Code Monkey logo

Comments (3)

arturocr avatar arturocr commented on June 2, 2024

I bet this is because it embeds nprogress sources and styles as well, which makes it a reasonable size.

from react-redux-spinner.

noseglid avatar noseglid commented on June 2, 2024

Hello,
Thank you for reporting this. As @arturocr states, it bundles nprogress, so the size is "reasonable".
One optimization we're looking to do is to include nprogress as a dependency (rather than as it is now - a devDependency which gets bundled in the react-redux-spinner.

This would only decrease the bundle size if you used nprogress outside of react-redux-spinner.

Additionally I think we could make the CSS inclusion conditional. But this would only help you decrease bundlesize if you provide your own CSS for styling.

I'll keep this issue open to track what we can do to decrease the bundlesize.

from react-redux-spinner.

noseglid avatar noseglid commented on June 2, 2024

I've found some optimizations which takes it from 46K to 26K.

  • Minify CSS (duh!)
  • Update to uglifyjs v3 (ES aware)
  • Upgrade dependencies which generally had a decreased bundlesize.

This is the bundle now:

Bundle: react-redux-spinner
prop-types: 24.88 KB (35.7%)
style-loader: 12.13 KB (17.4%)
nprogress: 11.29 KB (16.2%)
process: 5.17 KB (7.42%)
fbjs: 4.26 KB (6.11%)
css-loader: 2.21 KB (3.17%)
object-assign: 2.06 KB (2.95%)
<self>: 7.7 KB (11.0%)

from react-redux-spinner.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.