Turbo
Turbo

Reputation: 2551

Bower restore adds too many extra files in ASP.NET Core MVC Web Application

I created a asp.net core MVC web App using the default project template. It adds few bower dependencies like: jquery, bootstrap, etc. These dependency are already downloaded at wwwroot\lib.

If I now right click on bower.json and click "Restore packages", I don't expect it to download anything new. But it gets a lot of new files, about 50 or so. Is that expected?

Screenshots of before and after restore below.

Before

enter image description here

After

enter image description here

Upvotes: 0

Views: 156

Answers (1)

user2771704
user2771704

Reputation: 6202

Yes, it is totally fine for Bower, don't worry, it worked so 3-4 years ago, when I started using it. The main idea that Bower does not download just dist files for Bootstrap or jQuery, but the whole repository from GitHub.

Moreover Bower does not provide any option to download only dist files. And it is intentional, you can read this discussion.

Some time I used bower-installer to keep dist files in separate folder, but eventually I just moved to npm/yarn + webpack anyway.

Upvotes: 0

Related Questions