Skip to content
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 the bundle size by removing some lodash usage #1394

Merged
merged 11 commits into from
Apr 9, 2024

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Apr 9, 2024

Since npm-check-updates@17, the code and all the direct dependencies are now bundled together by the Vite.

Currently, the bundle size of the npm-check-updates is 7.1 MiB:

$ npm run build && du -sh build
# ....
7.1M	build

Since npm-check-updates@17 now targets Node.js 18+, we can replace some lodash usage with the native ES6 syntax and features. By doing so, the PR reduces the final bundle size to 6.2 MiB:

$ npm run build && du -sh build
# ....
6.2M	build

Copy link
Owner

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, much appreciated!

@raineorshine raineorshine merged commit c6a9723 into raineorshine:main Apr 9, 2024
7 checks passed
@SukkaW SukkaW deleted the reduce-bundle-size-1 branch April 11, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants