ls-age/babel-preset

Babel preset used by ls-age

Stars 0
Current release v0.1.0
View on GitHub

@ls-age/babel-preset

Babel preset used by ls-age

Install

npm install --save-dev @ls-age/babel-preset

Usage

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

Via CLI

babel script.js --presets @ls-age/babel-preset

Via Node API

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

Options

Options passed to the prefix can be a string or an object. When a string is given it is assumed to be the target option. Therefore

{
  "presets": [
    ["@ls-age/babel-preset", "browser"]
  ]
}

equals

{
  "presets": [
    ["@ls-age/babel-preset", { "target": "browser" }]
  ]
}

target

"node" | "browser", defaults to "node"

All other options are passed directly to babel-preset-env