Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 987 Bytes

preset-es2017.md

File metadata and controls

46 lines (30 loc) · 987 Bytes
layout title description permalink package
docs
ES2017 preset
Only compiles what's in ES2017 to ES2016
/docs/plugins/preset-es2017/
babel-preset-es2017

If you want to stay up to date, use the env preset

This preset includes the following plugins:

Basic Setup (with the CLI)

For more info, check out the setup page on the cli and the usage docs.

Install the CLI and this preset

npm install --save-dev babel-cli babel-preset-es2017

Make a .babelrc config file with the preset

echo '{ "presets": ["es2017"] }' > .babelrc

Create a file to run on

echo 'function a(b,) { console.log("hi"); }; a()' > index.js

Run it

./node_modules/.bin/babel-node index.js

{% include package_readme.html %}