@ecozoic/babel-preset-ecozoic v1.0.0
babel-preset-ecozoic
A Babel preset to quickly bootstrap a new application
Features
Babel Presets
babel-preset-env
(babel-preset-es2015
,babel-preset-es2016
,babel-preset-es2017
)babel-preset-react
babel-preset-stage-0
,babel-preset-stage-1
,babel-preset-stage-2
,babel-preset-stage-3
Babel Plugins
react-hot-loader/babel
babel-plugin-lodash
babel-plugin-styled-components
babel-plugin-transform-decorators-legacy
Installation
npm install @ecozoic/babel-preset-ecozoic
.babelrc
{
"presets": ["@ecozoic/ecozoic"]
}
Options
You can optionally configure the preset by passing in an options object in .babelrc
{
"presets": [
["@ecozoic/ecozoic", {
"env": {
"modules": false,
},
"styled": false,
"lodash": false,
"hmr": true,
"decorators": true,
"react": true
}]
]
}
Supported Options
"env"
- Options to pass tobabel-preset-env
."modules"
is set tofalse
by default to support using Webpack/Rollup bundling. Set"env"
tofalse
to disable preset."styled"
- Options to pass tobabel-plugin-styled-components
. Set tofalse
to disable plugin."lodash"
- Options to pass tobabel-plugin-lodash
. Set tofalse
to disable plugin."hmr"
- Set tofalse
to indicate you do not want to include React-Hot-Loader viareact-hot-loader/babel
."decorators"
- Set tofalse
to indicate you do not want to support decorator syntax viababel-plugin-transform-decorators-legacy
."react"
- Set tofalse
to indicate you do not want to support React/JSX/Flow viababel-preset-react
.
Test Environment
This preset automatically includes babel-plugin-transform-es2015-modules-commonjs
when NODE_ENV
is set to "test"
to support running tests in Node test runners like Jest.
6 years ago