ES Modules: suggestions for improvement

Isaac Schlueter i at
Tue Jun 26 22:12:33 PDT 2012

On Tue, Jun 26, 2012 at 4:48 PM, Wes Garland <wes at> wrote:
> On 26 June 2012 18:36, Aymeric Vitte <vitteaymeric at> wrote:
>> Node.js's way is good, except the "transitive dependency issue" mentioned
>>  in your post which in some cases indeed can cause problems.
> Does Node not handle transitive dependencies per CommonJS Modules/1.0?

Yes, node handles transitive dependencies via unfinished objects, much
like the old CommonJS Modules/1.0 style.

However, it's generally better to return a single thing from a module
if possible, rather than a bunch of stuff on an object.  We use
`module.exports` to accomplish that, and it's mostly good, but it
doesn't handle cycles well.

More information about the es-discuss mailing list