I have a set of requirejs named modules with constructor-as-function.
define('myModule', [ 'import1', 'import2' ], function(i1, i2) { ... });
I want to be able
- attach modules to HTML in the order in which you build the code DO NOT USE the requirejs API through script tags
- attach and use modules USING the requirejs API
Now I add a script call with define to the document, the script is loaded successfully, but the module does not receive the definition, the constructor is not called.
Is this normal behavior? Is there a workaround to fix this?
source share