3 ms·
I wish there was something I could do about reducing the contents of the node_modules folder instead of hiding the files somewhere else on disk. It angers me h
by jannes 8y ago
I wish there was something I could do about reducing the contents of the node_modules folder instead of hiding the files somewhere else on disk.
It angers me how many dependencies very simple projects amass.
- the_duke 8y agoIt's actually relatively easy, I've recently written a non-trivial project with exactly 2 dependencies. You just need to forgo all the conveniences the ecosystem provides and write stuff yourself instead. Node.js or the browser have everything you need.
- zkochan 8y agoThis change will reduce the size node_modules uses up (10 or more times). pnpm saves one version of a package only ever once on a disk and node_modules consume drastically less space
- zkochan 8y agohere's an article about how much less disk space is used by pnpm. This concept will probably come with the same disk space savings http://www.andrewconnell.com/blog/npm-yarn-pnpm-which-package-manager-should-you-use-for-sharepoint-framework-projects http://www.andrewconnell.com/blog/npm-yarn-pnpm-which-packag... but this concept is fresh, pnpm already works;)
- codingdave 8y agoBringing packages into your work is your own choice. You should always be doing an evaluation of the benefit given by a package vs. the bloat it brings to your project. For many packages, it is worth it. But if you are in the habit of installing a package just to avoid writing a widget in your UI or writing some helper functions, then... yes, your projects will amass dependencies quickly.
- jannes 8y agoMy main complaint is probably about webpack and its dependencies. Unfortunately, it seems to be the accepted standard bundler. The benefits of hot module replacement are too nice to forego easily.
- mschuetz 8y agoThe ridiculous amount of dependencies in webpack is one of the major reasons I went for rollup. I refuse to install anything that depends on is-odd.
- mifreewil 8y agoNot sure that webpack still depends on `is-odd` (at least not directly). Note that `is-odd` depends on `is-number` facepalm. Some people in this world seem to think their purpose is to create as many JS modules as possible.
- protonfish 8y agoI've been trying to clean up my excess node modules and found that when building a web-socket app, you don't need express (native http works fine) and you don't even need socket.io (unless your project needs to work on IE 9 or less) It's hard to find examples so I wrote one: https://github.com/chrisbroski/bare-socket https://github.com/chrisbroski/bare-socket