anorudes / redux-easy-boilerplate

React redux easy boilerplate
MIT License
633 stars 123 forks source link

Why don't we use bower for front end #71

Closed hafeez1042 closed 8 years ago

hafeez1042 commented 8 years ago

Why don't we use bower for front end, I think it will be better for reducing the size of build.

fixpunkt commented 8 years ago

Bower is a package manager. How would it reduce the size of the build?

hafeez1042 commented 8 years ago

I am not sure actually what happening when creating a build, this is what i get when comparing bower and npm, each package in npm has its own dependencies, when we use two packages both require different versions of jQuery, here we are forced to include 2 different jQuery. But bower packages don't allow its own dependencies, we have to add dependencies separately, so we can use a common jQuery for different packages.

Please correct me if i am wrong. Thankyou

fixpunkt commented 8 years ago

What version of NPM are you using?

I'd try the following:

This should make sure you only have a single version of jquery installed.

fixpunkt commented 8 years ago

Also note that just because two different versions of jquery end up in node_modules, this does not mean webpack will actually bundle both versions with your app.

hafeez1042 commented 8 years ago

Thanks bro, from now i can use npm confidently. Sorry for my limited knowledge.