Large node_modules bundle (216K)
Closed this issue · 3 comments
DenisCarriere commented
For a (<500 lines of code) library this is pretty large repo once installed in the node_modules
(216K).
$ du -h node_modules/avl
4.0K avl/bench
16K avl/build
96K avl/dist
24K avl/src
48K avl/tests
216K avl
One thing which helps prevent this is to include files
in the package.json
to exclude some of the unwanted files.
Or refactoring to pure ES5 would make the repo roughly ~24KB
{
"name": "avl",
"version": "1.3.0",
"author": "Alexander Milevski <info@w8r.name>",
"license": "MIT",
"description": "AVL tree",
"main": "dist/avl.js",
"jsnext:main": "index",
"module": "src/index",
"types": "src/index.d.ts",
"files": [
"src",
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/w8r/avl.git"
},
w8r commented
Which one do you suggest? I'd prefer "files"
DenisCarriere commented
👍 files is a good start :) I can send over a PR for that
DenisCarriere commented
Added files
to package.json