@ls-age/babel-preset

Babel preset used by ls-age

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@ls-age/babel-preset
020.4.05 years ago5 years agoMinified + gzip package size for @ls-age/babel-preset in KB

Readme

@ls-age/babel-preset
Babel preset used by ls-age

Install

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

Usage

Via .babelrc / "babel" field in package.json (Recommended)

{
  "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