October 31, 2013 by Anuraj
You can enable bundling and minification using Microsoft Web Optimization framework. You can install it using nuget.
Once you install the nuget package, you can write following code in global.asax file, in the Application_Start event.
Instead of selecting all the files in the scripts / styles folder, you can also specify / order of the files like this.
Bundling and minification is enabled or disabled by setting the value of the debug attribute in the compilation Element in the Web.config file.
You can override the Web.config setting with the EnableOptimizations property on the BundleTable class.
Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub