Conditional minification for specific packages using System.Web.Optimizations
I am using System.Web.Optimizations BundleConfig in my project. I am facing a problem with a specific jQuery plugin that I am using on my site. If I add the file to my ScriptBundle, it works fine in debug mode, but throws JavaScript errors when I'm in release mode (i.e., set Web.config debug = false). I think something is being misjudged.
All other scripts give me no problem, so I don't want to influence the behavior for all packages, but is there a way to configure for a specific package to tell it to use a specific version in debug and a min version in release.
I know the default behavior is to search for .min files, but I just can't seem to get this to work. Can anyone tell me what I am missing here? Thank you for your help.
Here's an example I shared myself. This works in debug, but not when I set debug = false in web.config
ScriptBundle layoutBundle = new ScriptBundle("~/jsbundles/jquery/layout");
layoutBundle.Include("~/Scripts/plugins/jquery.layout-latest.js");
bundles.Add(layoutBundle);
source to share