I've been fiddling with this for hours now and it's driving me mad. The network tab of chrome doesn't even show jquery being loaded and yet it's in exactly the same place in bundleconfig as it was before and scripts either side of it (including jquery-ui) are loading just fine.
I don't have a clue how to debug this - it just doesn't want to work!
Relevant part of bundleconfig:
bundles.Add(New ScriptBundle("~/scripts/vendor") _
.Include("~/scripts/jquery-{version}.min.js") _
.Include("~/scripts/jquery-ui-{version}.min.js") _
.Include("~/scripts/bootstrap.min.js") _
.Include("~/scripts/fancytree/jquery.fancytree.js") _
Top of main.js:
requirejs.config({
paths: {
'text': '../Scripts/text',
'durandal': '../Scripts/durandal',
'plugins': '../Scripts/durandal/plugins',
'transitions': '../Scripts/durandal/transitions'
}
});
define('jquery', function () { return jQuery; });
define('knockout', ko);
define(['durandal/system', 'durandal/app', 'durandal/viewLocator'], function (system, app, viewLocator) {
The line in main.js that says:
define('jquery', function () { return jQuery; });
creates an error in the console: "Uncaught ReferenceError: jQuery is not defined" and I'd guess this is because the jquery script hasn't been loaded.