The process of implementing a minification and bundling offers a lot of shortcomings and is a waste of time if you don’t know what you are doing. If you want a more optimized ASP.NET, implement ASP.NET Optimization Framework. To implement Optimization Framework, you need to create a class named BundleConfig. Then pass a collection of bundles in this class.
There are other steps involved in extending ASP.NET Optimization Framework, so I suggest to read this ASP.NET blog for a detailed tutorial.
The purpose of this tutorial is to disassemble Microsoft’s bundling and minification solution and how to derive and implement it in our own classes to achieve what we want.