Git Product home page Git Product logo

Comments (6)

davidkpiano avatar davidkpiano commented on May 12, 2024

I'll start seeing how we can refactor from top-down. For compatibility and not-reinventing-the-wheel reasons, I'd like to probably keep these:

  • isEqual (unless we find a smaller implementation)
  • get (for its path support)
  • toPath

We can probably find a simpler implementation of mapValues since it's only used internally, and not in the public API.

I'll take a look at what else (besides lodash) can be contributing to the size that we can probably shrink down.

Thanks for taking a look at this!

from react-redux-form.

chrisblossom avatar chrisblossom commented on May 12, 2024

I added a simple remake of mapValues that follows the current usage of it.

https://github.com/chrisblossom/react-redux-form/tree/feature/bundle_size

from react-redux-form.

chrisblossom avatar chrisblossom commented on May 12, 2024

Other lodash modules must share the same functions that are being used with mapValues.

Before:
Info:   main.js 291.89 kB (~82.07 kB gzipped)
lodash: 127.35 KB (12.1%)
react-redux-form: 35.47 KB (3.38%)

mapValues feature/bundle_size
Info:   main.js 291.25 kB (~81.65 kB gzipped)
lodash: 124.01 KB (11.8%)
react-redux-form: 35.59 KB (3.40%)

from react-redux-form.

kmudrick avatar kmudrick commented on May 12, 2024

I've used https://github.com/substack/node-deep-equal instead of lodash's isEqual and it is fairly small (but not sure if it is smaller than the lodash implementation)

from react-redux-form.

acidicX avatar acidicX commented on May 12, 2024

Webpack v2 will include tree shaking and only bundle the lodash functions you really used :-)
https://medium.com/modus-create-front-end-development/webpack-2-tree-shaking-configuration-9f1de90f3233

from react-redux-form.

davidkpiano avatar davidkpiano commented on May 12, 2024

@acidicX Yes, that'll be really helpful, though I anticipate many developers will still be using Webpack 1.

I am actively working on reducing the bundle size in V1, and you can check out the current work in the v1 branch.

from react-redux-form.

Related Issues (20)

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.