News for hackers. Stuff that matters.
Re:JavaScript Modules by notduncansmith on Wednesday July 02, 2014 @12:35AM (#7975204)
> The simplistic approach of CommonJS works, but long-term it's not the best solution for the wide use-cases of JavaScript.

Could you elaborate on this point a little more? I've worked on Node.js projects varying greatly in size, and even on the larger ones I've yet to feel encumbered the CommonJS module system.

Re:JavaScript Modules by Touche on Wednesday July 02, 2014 @09:17AM (#7976756)
By "wide use-cases" he means the Web and server. CJS doesn't work well on the web. ES6 modules were designed from the start to support both.
Re:JavaScript Modules by domenicd on Wednesday July 02, 2014 @10:03AM (#7977000)
This is a common strawman, with several examples to disprove it:

- https://github.com/cujojs/curl - https://github.com/montagejs/mr - https://github.com/substack/wreq

Re:JavaScript Modules by Touche on Wednesday July 02, 2014 @10:57AM (#7977327)
to support CommonJS in the browser you either 1) require that it is wrapped (and therefore isn't really CommonJS) or 2) you XHR it, wrap it yourself, and eval. That's it's possible to work around the problem doesn't discount that it "doesn't work well" in browsers.