@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-reactbabel-preset-stage-0,babel-preset-stage-1,babel-preset-stage-2,babel-preset-stage-3
Babel Plugins
react-hot-loader/babelbabel-plugin-lodashbabel-plugin-styled-componentsbabel-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 tofalseby default to support using Webpack/Rollup bundling. Set"env"tofalseto disable preset."styled"- Options to pass tobabel-plugin-styled-components. Set tofalseto disable plugin."lodash"- Options to pass tobabel-plugin-lodash. Set tofalseto disable plugin."hmr"- Set tofalseto indicate you do not want to include React-Hot-Loader viareact-hot-loader/babel."decorators"- Set tofalseto indicate you do not want to support decorator syntax viababel-plugin-transform-decorators-legacy."react"- Set tofalseto 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.
8 years ago