I've got two AMD
modules which should reference each other, but as soon as I add backward dependency, it stops working. I suppose it got stuck in waiting
state.
index.html
:
<!DOCTYPE html>
<html>
<head>
<script src="/curl.js"></script>
</head>
<body>
<script>
curl(['m1', 'm2'], function(m1, m2) {
console.log('done', m1, m2);
});
</script>
</body>
</html>
m1.js
:
define(['m2'], function() {
return 1;
});
m2.js
define(['m1'], function() {
return 2;
});