`minecraft-protocol` increases `node_modules` size by more than 200%
See original GitHub issue[x] The FAQ doesn’t contain a resolution to my issue
Versions
- minecraft-protocol: 1.30.0
- server: vanilla/spigot/paper n.a.
- node: 16
Detailed description of a problem
The library includes a lot of dependencies, it increased the size of /node_modules
by more than 200% and my docker image by about 50%. I believe this might be a bug (e.g. dev-dependencies included as prod-dependencies).
See also jojomatik/blockcluster#390. I’ve taken a look at the compressed sizes on dockerhub and have narrowed the range of commits down to the addition of this library to my project (even though the difference on dockerhub is pretty small in the compressed sizes).
Would you be able to take a look at all dependencies? Which ones are strictly necessary? Which dependencies would suffice as dev-dependencies? Would it be possible to make some dependencies optional, based on the protocol used?
Current code
n.a.
Expected behavior
/node_modules
and docker image don’t increase dramatically.
Additional context
Before:
After:
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
yeah, you’re not the first one to point this out though we could consider keeping the files as compressed in the npm package and only uncompressing at run time https://github.com/PrismarineJS/node-minecraft-data/issues/185 here’s an issue to track that idea
Yeah, that seems to be true for download times.
They seem to get uncompressed as soon as they are downloaded, but that shouldn’t be too much of an issue then the more I think about i. If I remove all unused/ old images and never have to run a lot of different versions of my software at the same time, those 70MB should not cause any issues.
Thanks for the fast response and clarification 😃