3 ms·
r.js tries to pull all the files in the base path and copy them to the build path by default. It also pulls the less files, non-built images - pretty much every
by spion 14y ago
r.js tries to pull all the files in the base path and copy them to the build path by default. It also pulls the less files, non-built images - pretty much everything, and mirrors it exactly at the build path.
How to turn this off? I suppose its the appDir option - or is it? With require.js's documentation and the confusing option names, who knows...
If its appDir, why isn't it called something saner like copyPaths that actually indicates what its going to do rather than assuming I'm familiar with its notion of "appDir"?
It all probably comes down to these two points:
* require.js options are confusingly named, and
* the documentation is convoluted and conflates explanations of multiple options at once
- nilliams 14y agoOh, now I'm with you. I guess I've never tried that kind of build, in fact maybe I found a lucky vector into the optimizer the first time I came across it, as I now see if you read the optimizer docs from top to bottom it does initially guide you towards the whole dir approach. Maybe the optimizer/r.js docs could do with splitting up into "how do I do X..." pages, so if you're purely after optimizing your JS, for example, the path is clearer.