Reputation: 1408
In the BundleConfig.cs I would like to make the following:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
use the minified version instead. I tried:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.min.js"));
but the jquery file was no longer included in my site. I am self hosting the minified version and it is present on the server.
Upvotes: 3
Views: 639
Reputation: 843
min versions of scripts are ignored while in debug mode due to the BundleCollection.IgnoreList. It can be modified to clear out the -min.js and other files, if needed.
Advanced options of Bundling and minfication
and while the suggestion of turning of debug in the web.config will work, you lose debug ability entirely for your application.
Upvotes: 3
Reputation: 81
Just keep the top code, but turn debug off in the web.config. It will then use the minified version
Upvotes: 0