require.config({ paths: { jquery: '../jquery-1.7.2.min', underscore: '../underscore-min', backbone: '../backbone-min' }, shim: { /* this configure is unnecessary underscore: { exports: function() { return _.noConflict(); } }, */ backbone: { deps: ['underscore', 'jquery'], exports: function() { return Backbone.noConflict(); } } } }); // Testing with QUnit require(['underscore'], function(_) { test('underscore is loaded correctly also in this case', function() { var evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); expect(3); notEqual(_, undefined); strictEqual(_, _.noConflict()); deepEqual(evens, [2,4,6]); }); });