3 ms·
> 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 aft
by gitgud 4y 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...