/babel-preset-es2015-optimized

ES2015 preset with optimized version of modules

Primary LanguageJavaScriptMIT LicenseMIT

babel-preset-es2015-loose

Babel preset that uses modify-babel-preset to modify babel-preset-es2015 and enable loose mode where available.

Install

Install both this preset, and the core 'babel-preset-es2015' that it modifies:

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

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["es2015-webpack-loose"]
}

Via CLI

$ babel script.js --presets es2015-webpack-loose

Via Node API

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