Before using Inject.setModuleRoot, both window.define and Inject.define point to the same object. However, once you call Inject.setModuleRoot, they no longer are the same object so trying to configure AMD using Inject.disableAMD(true) does not work.
See my jsfiddle https://jsfiddle.net/straker/174Legs7/.
The current workaround is to either set window.define to the Inject.disableAMD return object or configure AMD before you call set the module root.
Inject.setModuleRoot('url');
window.define = Inject.disableAMD(true);
// or
Inject.disableAMD(true);
Inject.setModuleRoot('url');
However, I believe when you set the module root you should also reset the global define function to equal Inject.define again.
Before using
Inject.setModuleRoot, bothwindow.defineandInject.definepoint to the same object. However, once you callInject.setModuleRoot, they no longer are the same object so trying to configure AMD usingInject.disableAMD(true)does not work.See my jsfiddle https://jsfiddle.net/straker/174Legs7/.
The current workaround is to either set
window.defineto theInject.disableAMDreturn object or configure AMD before you call set the module root.However, I believe when you set the module root you should also reset the global define function to equal
Inject.defineagain.