-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Reduce installation size #609
Conversation
3032caa
to
4523798
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍. Can you add more changelog entries as well?
.compact() | ||
.flatten() | ||
.uniqBy('id') | ||
// Filtering out Webpack's runtime modules as they don't have ids and can't be parsed (introduced in Webpack 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep these documentation comments as they give reasoning why certain logic exists :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! I keep forgetting about this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks good to me 👍
This PR and #505 have been released in v4.9.1 now |
the usage of those individual packages is discouraged: https://lodash.com/per-method-packages Also, as soon as another package also depends on lodash, this change actually increases the size of node_modules as lodash was deduplicated before. |
For most of my projects, the only copy of Since lodash is essentially dead (hasn't been maintained for years), IMHO instead of reverting back to lodash, replacing all |
Well, lodash is indeed kinda dead since 3 years. But the per-method packages have last been released 7 years ago. So they are still missing 4 years of work in the lodash package. |
The PR follows #505. The PR reduces
node_modules
size afternpm i webpack-bundle-analyzer
with 2 changes:chalk
withpicocolors
lodash
with individuallodash.*
packages.Comparison
Running
npm i --omit=dev --omit=optional
againstwebpack-contrib/webpack-bundle-analyzer:master
:Running
npm i --omit=dev --omit=optional
againstsukkaw/webpack-bundle-analyzer:optimize-install-size
: