When using the UMD module output, the require.js optimizer is not able to trace dependencies. My first impulse was to fix it there (see requirejs/r.js#857), but their feedback was that it would probably be easier to change the output to something like this:
(function (factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(['require', 'exports', 'lib'], factory);
}
})(function (require, exports) {
var lib = require('lib');
});
When using the UMD module output, the require.js optimizer is not able to trace dependencies. My first impulse was to fix it there (see requirejs/r.js#857), but their feedback was that it would probably be easier to change the output to something like this: