What is the difference between npm and bower?

npm is most commonly used for managing Node.js modules, but it works for the front-end too. Bower is created solely for the front-end and is optimized with that in mind.

The biggest difference is that npm does nested dependency tree (size heavy) while Bower requires a flat dependency tree (puts the burden of dependency resolution on the user).

A nested dependency means that your dependencies can have their own dependencies which can have their own, and so on. This is really great on the server where you don’t have to care much about the space and latency.

Leave a Reply

Your email address will not be published. Required fields are marked *