Re:Adding JavaScript modules to the web platform
by roadbeats on Wednesday April 13, 2016 @06:34PM
(#11492895)
If you look at how browserify/webpack works, you'll see that AMD is the same thing except that you're coding the module wrappers by yourself manually, when browserify & webpack does it for you.
[ Parent
| on HN ]
Re:Adding JavaScript modules to the web platform
by spankalee on Wednesday April 13, 2016 @08:15PM
(#11493414)
Right, so AMD works in the browser, and CommonJS doesn't. Tools can transform CommonJS to behave like AMD.
Re:Adding JavaScript modules to the web platform
by roadbeats on Thursday April 14, 2016 @01:12PM
(#11498551)
oh man, you're confused. AMD was originally a CommonJS compiler in its very early days. The guy who wrote it invented its own standard (AMD) way later than CommonJS.
Re:Adding JavaScript modules to the web platform
by spankalee on Friday April 15, 2016 @07:10PM
(#11508304)
How am I confused? AMD works in the browser, CommonJS doesn't. It's very simple, and tools that convert CommonJS to a format that works in the browser only prove that it doesn't.
The history of the formats does not change the facts of how they operate today.