Improve npm package size
See original GitHub issueHave you read the FAQ and checked for duplicate open issues? Yes
Is your feature request related to a problem? Please describe.
npm install shaka-player adds 22+Mb under node_modules. This is the entire content of the git repository plus the compiled JS files.
I note that there is a .npmignore which is only omiting a few compilation artefacts.
Describe the solution you’d like
Modify .npmignore to only include relevant dist files (e.g. demos aren’t presumably needed) and the sources needed for the .map files (lib, ui); this will reduce the disk size to about 8Mb.
Describe alternatives you’ve considered
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Node module size: See how I reduced it by 90% | TSH.io
You've ended up with 1GB node module size? We know the struggle is real but there's a way to reduce that size to...
Read more >Reducing npm package size by 83% - DEV Community
NPM recently added Unpacked Size to the package details, I then realized one of my libraries was way too big (350kb) for the...
Read more >Bundlephobia | Size of npm dependencies
Bundlephobia helps you find the performance impact of npm packages. Find the size of any javascript package and its effect on your frontend...
Read more >5 Methods to Reduce JavaScript Bundle Size - Bits and Pieces
If your application bundle size increases and affects performance, you can compress them to reduce the size. Gzip and Brotli are the most ......
Read more >How to Worry About npm Package Weight - CSS-Tricks
Bundlephobia will give you a look at the total size — both zipped and unzipped — along with download times, the number of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I don’t think it should/needs to be possible to rebuild the project from the package. At least I’ve never done that for my packages…
For the externs - maybe there is a legitimate reason to keep them but I’m not familiar with it.
I’ve tried the change ony end (excluding
.githubas well as you noted) and can do a PR tomorrow.Sounds good. A PR would be appreciated. Thanks!