Skip to content

Reduce package size by adding "files" field to package.json#65

Merged
jonkoops merged 2 commits intojfromaniello:mainfrom
FujiHaruka:reduce_package_size
Mar 23, 2022
Merged

Reduce package size by adding "files" field to package.json#65
jonkoops merged 2 commits intojfromaniello:mainfrom
FujiHaruka:reduce_package_size

Conversation

@FujiHaruka
Copy link
Copy Markdown
Contributor

I greatly appreciate this great and simple library you developed to join URLs.

Because your library is so famous and so many installed, it would be nice if the package size gets smaller.

This PR just suggests to reduce the package size by adding "files" field to package.json

This change will make the package size smaller.

I checked how effective it is by comparing the sizes as following.

Without "files" field: 18.3 kB

$ npm publish --dry-run 2>&1 | grep "unpacked size"
npm notice unpacked size: 18.3 kB

With "files" field: 4.8 kB

$ npm publish --dry-run 2>&1 | grep "unpacked size"
npm notice unpacked size: 4.8 kB

Thank you.

@jonkoops jonkoops merged commit be56f57 into jfromaniello:main Mar 23, 2022
@jonkoops
Copy link
Copy Markdown
Collaborator

Great addition, thanks for your contribution @FujiHaruka!

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.

2 participants