GithubHelp home page GithubHelp logo

Comments (9)

jdalton avatar jdalton commented on May 22, 2024

Hi @faceyspacey!

At that point you're probably better off manually cherry-picking.

from lodash-webpack-plugin.

faceyspacey avatar faceyspacey commented on May 22, 2024

I am and all the package I use are (i.e. importing via full path, eg: import find from 'lodash/find'). Until I used this package I could not reduce lodash's size from 135kb. Now I'm at 70kb, but still with a bunch of unused functions. Here's my build size visualized:

https://www.dropbox.com/s/cik6rw9kmpexynr/Screenshot%202016-10-30%2016.54.44.png?dl=0

Is it that one of the packages I use imports via dot syntax? import find from 'lodash.find'? Or is that the same as importing by full paths?

from lodash-webpack-plugin.

jdalton avatar jdalton commented on May 22, 2024

This plugin doesn't work with the per method packages like lodash.find.
For a sanity check, the full-build of Lodash is ~23kb minified+gzipped.

from lodash-webpack-plugin.

faceyspacey avatar faceyspacey commented on May 22, 2024

I know, I'm just trying to get it to 1kb since only like 5 methods are used. Going from a 150kb build (minified and gzipped) to 128kb build is substantial. ..Glad to know the the per method packages operate differently/separately.

from lodash-webpack-plugin.

jdalton avatar jdalton commented on May 22, 2024

What are the 5 methods?

from lodash-webpack-plugin.

faceyspacey avatar faceyspacey commented on May 22, 2024

memoize, debounce, find, findIndex, isEqual, isString, though webpack visualizer is picking up a few internal methods like _baseMergeDeep.

here's what i'm using to visualize the size of imports:
https://chrisbateman.github.io/webpack-visualizer

from lodash-webpack-plugin.

jdalton avatar jdalton commented on May 22, 2024

That build is 2.75 kB minified+gzipped.
Created with a a combo of babel-plugin-lodash and lodash-webpack-plugin.

from lodash-webpack-plugin.

faceyspacey avatar faceyspacey commented on May 22, 2024

do you know why it's showing as so much more (yes, I know it's pre-minification/gzipping):

https://www.dropbox.com/s/a4stwjrg4idxaiv/Screenshot%202016-10-30%2022.23.17.png?dl=0

The green bar without any orange child nodes, to me, has meant shipped but unused functions. Is it lodash core possibly? Does 70kb make sense for just that pre-minification/gzipping?

from lodash-webpack-plugin.

jdalton avatar jdalton commented on May 22, 2024

If I had to guess it's probably showing the cumulative total of the individual uniminified modules before the lodash-webpack-plugin is applied.

from lodash-webpack-plugin.

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.