ASP.NET Core NPM and webpack/Gulp

Asked

Viewed 92 times

1

I created a project in Asp.net core using the Empty template (dotnet new web).

For what I searched, to add packages like Bootstrap or jquery, we have to use NPM, which is basically to add the package.json at the root of the project and the basic keys.

Using the command npm install jquery and npm install bootstrap i install the packages I need, but it creates the folder node_modules and the default folder for dependencies of javascript and css is the folder wwwroot.

Now I need to know how to copy only required files from folder node_modules, I know there’s a Gulp and the webpack for this. But I have not been able to implement these tools in my project.

So my question is how to implement the gulp or the webpack on a project ASP.NET Core.

And which one is more recommended to use.

  • dotnet new itself has no template that uses Node.js with . net core? Here at work I don’t have the . net core.

  • Would have the angular template

  • 1

    In addition to the initial templates, you can install new templates, you can consult some on the following link Available templates for dotnet new. you can refer to the list of templates installed with the command dotnet new -h

  • Try using the dotnet new webapi. In this template you only have the API that is uncoupled from the front end. So you can work with Node.js quietly without worrying about wwwroot.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.