Disable Orchard.jQuery module

Topics: Administration, Core, General, Writing modules
Mar 16, 2013 at 11:10 AM
How can i disable Orchard.jQuery module?
I trying implement MVC4 Bundling and Minification but this module throw its own version of jQuery.js
Mar 16, 2013 at 3:32 PM
I don't think you can disable that feature. I also don't think that Orchard.jQuery itself throws in script includes; it's probably one or more other modules that depend on jQuery and register the resourced via ScriptManager.Require / Script.Require.

What you could try is defining your own IResourceManifestProvider and register your own version of jQuery using the same resource name ("jQuery") and set the version of that resource to the jQuery version you're exposing. That will cause your provided jQuery version to be registered.
There's a risk though: Modules may have been specifically been tested for the current jQuery version that Orchard is using, and when suddenly a newer version of jQuery is being used, it could potentially break the javascript code of the depending module.

Alternatively, find out what module / class / view is Requiring jQuery, and have it stop doing that (in the case of a view that's a simple matter of overriding the view and removing the call to Script.Require("jQuery")).