ES2015 block scoping transform · Babel


Compile ES2015 block scoping (const and let) to ES5

Add the following line to your .babelrc file:

This is a companion discussion topic for the original entry at


Should this plugin check for the following incorrect code?:

const getHash = () => ()
const state = { type: "transient", hash: getHash(state) }

State is used before it is defined.