See https://github.com/nodejs/node/issues/7224 for context. To summarise, if punycode.jsdetects a global AMD define, then nodeRequire('url').parse('http://foo.bar/baz) breaks because punycode exports nothing for Node's require.
A good solution to this would be to call both define() and assign to module.exports if possible.
See https://github.com/nodejs/node/issues/7224 for context. To summarise, if punycode.js detects a global AMD
define
, thennodeRequire('url').parse('http://foo.bar/baz)
breaks becausepunycode
exports nothing for Node's require.A good solution to this would be to call both
define()
and assign tomodule.exports
if possible.