babel/packages/babel-plugin-transform-es2015-block-scoping
Logan Smyth 61b3a6314b Merge pull request #3490 from jayphelps/T7324
create new lexical env inside switch statement blocks, fixes #T7324
2016-05-30 14:42:29 -07:00
..
2016-05-17 14:49:17 -04:00
2015-09-15 06:12:46 +01:00

babel-plugin-transform-es2015-block-scoping

Compile ES2015 block scoping (const and let) to ES5

Installation

$ npm install babel-plugin-transform-es2015-block-scoping

Usage

.babelrc

{
  "plugins": ["transform-es2015-block-scoping"]
}

Via CLI

$ babel --plugins transform-es2015-block-scoping script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-es2015-block-scoping"]
});