your first step is to pick a minify and bundling tool. you have several options. once you pick one, google for examples
webpack (what I use and probably most common tool used). along with bundle and optimization supports dynamic loading, transformations.
glup. a dedicated build tool commonly used for javascript and css.
asp.net core middleware (used by some templates and many asp.net developers):
https://github.com/ligershark/WebOptimizer
note: you may also want less or sass support for your css files. all the above have plug ins for this support.