question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve npm package size

See original GitHub issue

Have 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:open
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
elsassphcommented, Oct 5, 2019

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 .github as well as you noted) and can do a PR tomorrow.

0reactions
joeyparrishcommented, Mar 12, 2021

Sounds good. A PR would be appreciated. Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found