Skip to content

Instantly share code, notes, and snippets.

@bryanforbes
Created May 13, 2011 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanforbes/970581 to your computer and use it in GitHub Desktop.
Save bryanforbes/970581 to your computer and use it in GitHub Desktop.
Recursive module requires
define([], function(){
require(['tests/recurse/b']);
return {};
});
define(['./a'], function(a){
a.loaded = true;
return a;
});
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Recursive require test</title>
<style>
</style>
<script>
var dojoConfig = {
async: true,
packages: [{
name: 'tests',
location: '../tests',
lib: '.'
}]
};
</script>
<script src="../../dojo/dojo.js"></script>
<script>
require(['tests/recurse/a'], function(a){
console.log(!!a.loaded);
});
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment