@ls-age/babel-preset
v0.4.0
Published
Babel preset used by ls-age
Downloads
39
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