RequireJS has the nice opportunity to optimize a JS project in one single script (let it be foo.js ).
If I include foo.js , I get: Uncaught ReferenceError: define is not defined . The error goes away if I add require.js to foo.js because define is defined by RequireJS. I do not want my library users to have to do this in order to use it.
Can I get RequireJS to properly inject itself inside foo.js ? Will file concatenation be acceptable?
Warren seine
source share