The late, great .Net guru K Scott Allen created and supported a middleware bridge for .Net Core projects that provide support for using NPM modules (“package.json”) in .Net projects. This NuGet library will install the support for you.
What it will get you is the ability to reference external libraries such as jQuery and bootstrap within a web project in .Net Core.
Usage is quite simple. Simply pull the package down via NuGet, install your npm packages and then add this simple line in startup.cs:
That’s it. Then in your source html and razor pages you can reference the /node_modules directory as if it was a child of the wwwroot folder which is where .Net core normally looks for static files.