Closed hafeez1042 closed 8 years ago
Bower is a package manager. How would it reduce the size of the build?
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
What version of NPM are you using?
I'd try the following:
npm -v
rm -rf node_modules && npm install
This should make sure you only have a single version of jquery installed.
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.
Thanks bro, from now i can use npm confidently. Sorry for my limited knowledge.
Why don't we use bower for front end, I think it will be better for reducing the size of build.