require.js/almond.js lowercasing module name?

94 Views Asked by At

I'm using require.js 2.0.6 to load several modules, including a library of mine that itself is wrapped in almond.js 0.2.5. When I attempt to do require(['MyModule'], function (MyModule) {}); what ends up in require.s.contexts._.defined is mymodule (lowercase). I need to instead expose the mixed-case MyModule to support backward compatibility for my MyModule API.

Is this expected or known behavior? If so, is there a workaround?

1

There are 1 best solutions below

0
On

Is this expected or known behavior?

It is not expected behavior. I've just tested it. I've created two modules which differed only by capitalization, both loaded and both displayed their respective diagnosis messages to the console.