4 ms·
Sorry, I have a bad habit of posting when I'm halfway out the front door for something... For instance, as I understand it, the reason Node packages are so sma
by krapp 5y ago
Sorry, I have a bad habit of posting when I'm halfway out the front door for something...
For instance, as I understand it, the reason Node packages are so small is to make it efficient to run them in browsers. But that also exponentially increases the brittleness and vulnerability of the code. Optimizing for the always-live continuous deployment processes of web development runs counter to what is necessary for stable and secure code on the backend.
I may be wrong, though, it's just something that occurred to me while I was wondering about this exact problem.
- ss108 5y agoInteresting, thanks
- gitgud 5y ago> as I understand it, the reason Node packages are so small is to make it efficient to run them in browsers Usage of npm packages in browsers is kind of an after thought, as originally people used a separate dependency management for the browser (bower js) The NPM ecosystem has a huge focus on reusability of libraries, smaller packages is just an emerging phenomenon when reusability is the goal. Also, small packages are a way to embrace the Unix philosophy, "do one thing and do it well" But yes, smaller packages create large dependency chains and a greater attack surface...