Note about requirejs - require, define, shim and config.js


 Just a quick recap of what's theses terms means

1, define - allows you to load module and its dependencies asynchronously. Assuming that your script supports AMD.




2. shim - allows you to add support for older script that does NOT support AMD. It has a few options like configuring deps, exports,

Configuring dependencies - here we are saying we need moduleA and moduleB too.



Configuring exports - here we are saying we need moduleA and from now onwards it will be known as ModA.



3. require() is to load modules. define() is to expose functions in a module to promote code reuse.


Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm