Babel 6 – First Look at the New Transpiler

Luiz TanureLuiz Tanure
1 min read

Note: This article was originally published on November 2, 2015. Some information may be outdated.

Babel 6 was released on 2015‑10‑29.

The team rewrote the tool into smaller, scoped packages and added presets.

Key changes

  • No single babel package. Use scoped packages instead
  • Everything is a plugin; nothing happens by default
  • Presets (like @babel/preset-env) group common plugins

Fresh setup

npm install --save-dev @babel/core @babel/cli @babel/preset-env @babel/preset-react
echo '{ "presets": ["@babel/preset-env", "@babel/preset-react"] }' > .babelrc
npx babel src --out-dir dist

Upgrade tip from Babel 5

npm uninstall babel
npm install --save-dev @babel/core

Swap the old es2015 preset for @babel/preset-env.


Originally published at letanure.dev

0
Subscribe to my newsletter

Read articles from Luiz Tanure directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Luiz Tanure
Luiz Tanure