It probably shouldn't but JS doesn't have much of a standard library so it's easy to make unfair comparisons.
How big do you think a java client to do the same thing would be?
How big do you think a java client to do the same thing would be?
For example in a side project I tried SammyJs then realised it requires jQuery. So I just hunted for something that can route urls without the needless dependency. I chose Navigo.
Point is it takes some care but not too hard to keep the size reasonable. Also don't use npm for dependencies on a web site. But npm is ok for tooling e.g. webpack