The second one is wrong, it will get dep instead of require. 'require' 'exports' and 'module' should be just like regular deps, and can be anywhere in deps array, the error in amd loader is that it always adds them at the start of the array, it should add them only if deps is empty. ToString isn't required because importScript is synchronous.