moduleA.js
define(['require', 'jquery'], function (require, $) {
"use strict";
var deferred = $.Deferred();
require(['moduleB'],function(moduleB){
deferred.resolve(moduleB);
});
return deferred.promise();
});
app.js
require(['moduleA'],function(deferred){
deferred.done(function(moduleA) {
console.log(moduleA);
});
});