JSPM

  • Created
  • Published
  • Downloads 17739
  • Score
    100M100P100Q54397F
  • License MIT

Babel preset for all es2015 plugins.

Package Exports

  • @babel/preset-es2015

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@babel/preset-es2015) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@babel/preset-es2015

Babel preset for all es2015 plugins.

Install

npm install --save-dev @babel/preset-es2015

Usage

.babelrc

{
  "presets": ["@babel/preset-es2015"]
}

Via CLI

babel script.js --presets @babel/preset-es2015

Via Node API

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

Options

loose

boolean, defaults to false.

Enable "loose" transformations for any plugins in this preset that allow them.

modules

"amd" | "umd" | "systemjs" | "commonjs" | "cjs" | false, defaults to "commonjs".

Enable transformation of ES6 module syntax to another module type.

Setting this to false will not transform modules.

spec

boolean, defaults to false.

Enable "spec" transformations for any plugins in this preset that allow them.