Babel logo

Babel is a JavaScript "transpiler", it compiles "source to source" (JavaScript to JavaScript).

Different transforms allow us to use features/technology/syntax that wouldn't usually be possible. e.g. ES2015, React, jsx.

Example

Input:

var myString = `hey`;

Output:

var myString = "hey";

You can try Babel out and see the transpiled code live on the Babel site

Presets

Presets are essentially plugins for Babel that transpile specific features or languages

Today we'll be using:

  • ES2015
  • Stage 0
  • Stage 1
  • Stage 2
  • Stage 3
  • React

results matching ""

    No results matching ""