Is the following possible with RequireJS ?
Module A:
define([
'moduleB'
], function(moduleB){
console.log(moduleB);
var moduleA = {};
moduleA.varA = 'This is a variable in module A';
return moduleA
});
Module B:
define([
'moduleA'
], function(moduleA){
console.log(moduleA);
var moduleB= {};
moduleB.varB= 'This is a variable in module B';
return moduleB
});
source
share