I want to include jquery-1.4.2
in parallel with jquery-3.x
.
I have aliased the paths of both scripts as: jquery1
/jquery3
For jquery-3.x the code below works:
require("imports-loader?jQuery=jquery3!app/some.jquery.myplugin");
But If i do the same for jquery1 :
require("imports-loader?jQuery=jquery1!app/some.jquery.mylegacyplugin");
I get at runtime: cannot set property mylegacyplugin of undefined.
The only solution I found till now is to edit jquery-1.4.2. file and add the following at the end of the function:
module.exports=jQuery;
Is there a loader which I can use to avoid editing the source code of jquery?