1

Why should I use npm with asp.net core? Is there a difference between using npm and adding client-side libs like this?

enter image description hereenter image description here

1 Answer 1

2

Why should I use npm with asp.net core?

If your ASP.NET Core project has no dependency on any npm packages such as React.js/ Angular/ Vue/ e.t.c, you don't need to use npm to install client dependencies at all (Simply Pay as you go).

Is there a difference between using npm and adding client-side libs like this?

Yes.

The second way is invoking LibMan instead of the npm behind the scenes.

As the official document describes, LibMan is a lightweight tool written in C# to download popular libraries. When dealing with dependencies, LibMan is similar to npm in some way.

However, Libman will download libraries from CDNs(including CDNJS and unpkg) instead of from npmjs or other npm repositories.

Also, it's easy to custom the path of your dependency files. There's no need to copy files from node_modules/.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.