RequireJS has a nice feature to optimize a JS project into one single script (let's call it foo.js).
If I include foo.js, I get: Uncaught ReferenceError: define is not defined. The error goes away if I add require.js before foo.js, because define is defined by RequireJS. I don't want my library users to have to do that to use it.
Can I make RequireJS embed itself inside the foo.js in a proper way? Would concatenating files be acceptable?