Dojo AMD incorporating third party scripts

So, you’ve started using RequireJS or you’ve upgraded to the latest version of Dojo and have converted your web application over to Asynchronous Module Definition (AMD) loading. However, your code still depend on some third party non-AMD scripts. Can and should these scripts be incorporated as AMD dependencies? By “non-AMD” I mean the third party scripts which are not wrapped in a define() or require().

define([ /* ... */], function(){
   //... body of third party script

The most important question to answer is: Can you modify the code?

Continue reading