Search code examples
javascriptdojoamd

Dojo/AMD module ID case sensitivity


I'm working with some dojo code and I found what I think are 2 modules with similar names:

foo/blarg
foo/Blarg

Does Dojo/AMD allow module ids to differ only by case like this?


Solution

  • Yes it should be possible but files for the module must have the same case as the identification in the require.

    Example:

    blarg.js
    Blarg.js
    

    I would also suggest you use a good naming for the module in case you have no strong naming convention in place. Example using require:

    require(['foo/blarg', 'foo/Blarg' ], function(blarg, Blarg){});