I've built my app using require.js in order to keep everything modular. Having finished it turns out that require.js itself is bigger than my optimised app code. Is there some way I can get r.js to optimise in such a way that I don't need to include require.js in the final page (e.g. replacing all my define
calls with direct definition of properties on a namespace object, with the whole thing wrapped in a closure).
I'm only using define()
- never require()
, if that makes a difference..?