AMD loaders will scan for require('dep') style dependencies when just a factory function is passed to define (no dependency array). Now that projects may use CommonJS/Node modules internal to source function to generate the final exports, this is causing some undesired matching behavior, the AMD loader may also try to load modules for those require('dep') names.
Passing an empty dependency array, as this changeset does, avoids that factory function scanning and possible confusion around if the UMD-wrapped code has dependencies.
Pass empty dependency array for AMD to prevent dependency scanning
+1, it will be helpful.
@jrburke @ForbesLindesay @substack This issue has affected Browerify and React. The latter contains require('dep') in comments.
* Collection of methods that allow declaration and validation of props that are
* supplied to React components. Example usage:
* var Props = require('ReactPropTypes');
Would you like to be added as a collaborator on this repository?
That is not necessary, the commit log is enough for me.