Use JS2015 (former ES6) on regular web pages with Babel and Browserfy with these 5 simple steps.

Our files:

1. Check if npm is installed:

2. Install Babel modules:

3. Transpile to ES2016:

Be aware of spaces in the brackets!

4. Use the transpiled file instead:

5. Repeat step 3 whenever you change your JS

And that’s it!

Using with React

1. Install ReactJS (if you didn’t yet):

2. Install ReactJS module:

3. Transpile with:

Common problems:

ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’
You used wrong spaces in the brackets.