Comments (9)
Hi @faceyspacey!
At that point you're probably better off manually cherry-picking.
from lodash-webpack-plugin.
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.
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.
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.
What are the 5 methods?
from lodash-webpack-plugin.
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.
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.
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.
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)
- What feature does _.toArray belong to? HOT 2
- Compare Set() in isEqual HOT 1
- when i use get, it should depends on _baseGet , but load getValue HOT 1
- Tell the user of overrides or throw an error HOT 4
- Does a rollup alternative make sense? HOT 2
- Uncaught TypeError: Cannot read property 'length' of undefined HOT 1
- Webpack builds are not deterministic (omit sometimes behaves differently) HOT 2
- Expand the explanation on what the plugin actually is doing HOT 1
- Add support for Webpack v5 HOT 5
- pack the wrong function HOT 1
- _.map just to arrayMap ? forgot baseMap ? HOT 1
- import get method on demand error HOT 2
- Error: NormalModuleFactory.afterResolve is no longer a waterfall hook, but a bailing hook instead. HOT 3
- Switch to GitHub Actions for CI
- Get/_BaseGet cannot get right value of an object HOT 1
- Some problems should be seriously taken HOT 2
- READEME incorrect HOT 2
- pnpm
- Cannot read property 'has' of undefined
- Docs update or support Set and Map out of the box
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lodash-webpack-plugin.