This project is read-only.

Minified jQuery

Topics: General, Troubleshooting, Writing themes
Dec 28, 2011 at 9:31 PM

I'm using 


to include jQuery 1.7.1. I see that the jQuery module has the minified version. How can I specify that I want the minified version? (will use non-minified during development/debug, and then switch to min to go live). 

Dec 28, 2011 at 9:38 PM
Edited Dec 28, 2011 at 9:45 PM


Dec 28, 2011 at 9:42 PM

I thought that's what it was, but I'm getting the following error:

Compiler Error Message: CS1955: Non-invocable member 'Orchard.UI.Resources.RequireSettings.DebugMode' cannot be used like a method.

Source Error:

Line 9:      SetMeta("viewport", "width=device-width,initial-scale=1");
Line 10: 
Line 11:     Script.Require("jQuery").DebugMode(false);
Line 12:     Script.Include("libs/modernizr-2.0.6.min.js").AtHead();
Line 13:  
Dec 28, 2011 at 9:45 PM

It's UseDebugMode (I updated my post)

Dec 28, 2011 at 9:47 PM

/palmface. I see now. Thanks!

Jan 3, 2012 at 6:06 PM

Do you have to call .UseDebugMode(false) to get it to use minified, or does the Script manager automatically serve the minified version (based on web.config debug mode setting, or something else?)? 

Jan 3, 2012 at 6:17 PM

It's based on the web.config settings by default. though you can't override it from the Settings > General section.