@lugia/babel-preset-mega
v1.2.2
Published
Babel preset used by @lugia/mega
Downloads
15
Keywords
Readme
@lugia/babel-preset-mega
Usage
First, install Babel.
Then install @lugia/babel-preset-mega.
yarn add @lugia/babel-preset-mega
Then create a file named .babelrc
with following contents in the root folder of your project:
{
"presets": ["@lugia/mega"]
}
This preset uses the useBuiltIns
option with transform-object-rest-spread and transform-react-jsx, which assumes that Object.assign
is available or polyfilled.
Usage with Flow
Make sure you have a .flowconfig file at the root directory. You can also use the flow option on .babelrc:
{
"presets": [["@lugia/mega", { "flow": true, "typescript": false }]]
}
Usage with TypeScript
Make sure you have a tsconfig.json file at the root directory. You can also use the typescript option on .babelrc:
{
"presets": [["@lugia/mega", { "flow": false, "typescript": true }]]
}