Skip to content

Instantly share code, notes, and snippets.

@ng-the-engineer
Last active October 5, 2020 08:06
Show Gist options
  • Save ng-the-engineer/231a6c8d8a4865c480a3e709e77fea0e to your computer and use it in GitHub Desktop.
Save ng-the-engineer/231a6c8d8a4865c480a3e709e77fea0e to your computer and use it in GitHub Desktop.
ES2015 babel setup

ES6 babel setup

  1. Install Babel
$ npm install -D babel-cli babel-preset-es2015
  1. Create .babelrc in root folder
{
  "presets": ["es2015"]
}
  1. Add build script. Compile to build folder.
"scripts": {    
    "build": "babel --presets es2015 -d build/ src"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment