3 ms·
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 brow
by roadbeats 11y ago
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.
- spankalee 11y agoRight, so AMD works in the browser, and CommonJS doesn't. Tools can transform CommonJS to behave like AMD.
- roadbeats 11y agooh 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.
- spankalee 11y agoHow 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.