node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

babel-preset-es2015-webpack2

babel-preset-es2015-webpack2

Babel preset for all es2015 plugins except es2015-modules-commonjs (because webpack2 supports it already!).

Install

$ npm install --save-dev babel-preset-es2015-webpack2

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["es2015-webpack2"]
}

Via CLI

$ babel script.js --presets es2015-webpack2

Via Node API

require("babel-core").transform("code", {
  presets: ["es2015-webpack2"]
});