# Getting Started with ES6 Modules

DevFeed: [Getting Started with ES6 Modules](<https://devfeed.tech/articles/getting-started-with-es6-modules-40627.md>)

Original publisher: [Read original article](<https://eviltrout.com/blog/2014-05-03-getting-started-with-es6/>)

Published: 2014-05-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Robin Ward](<https://devfeed.tech/sources/robin-ward.md>)

Topics: [ECMAScript](<https://devfeed.tech/topics/ecmascript.md>), [modules](<https://devfeed.tech/topics/modules.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [CommonJS](<https://devfeed.tech/topics/commonjs.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [commonjs](<https://devfeed.tech/tags/commonjs.md>), [es6](<https://devfeed.tech/tags/es6.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [modules](<https://devfeed.tech/tags/modules.md>), [node-js](<https://devfeed.tech/tags/node-js.md>)

## AI overview

This tutorial introduces ES6 modules, explaining how they provide standardized JavaScript module syntax after the competing AMD and CommonJS approaches. It demonstrates exporting and using a class across files and explains that transpilers can make ES6 modules usable in browsers before native support is available.

## Source excerpt

Javascript is a fantastic example of how something, despite having visible warts and very poor design, can dominate the tech landscape. Nobody uses Javascript because it's a beautiful language; they use it because it's ubiquitous. Its warts are now well understood and most have workarounds. An amazing omission in Javascript's design is the lack of a built-in module system. As more projects used Javascript and shared more code, the need for a robust module system became necessary. Two contenders sprung up, Asynchronous Module Definition (AMD) and CommonJS (CJS). The former is much more popular with browser applications and the latter is much more popular with server applications written in node.js.