@invisionag/babel-config-ivx
v5.2.2
Published
# Description This package provides a baseline configuration for babel as it is being used within our organisation. It adds:
Downloads
88
Maintainers
Keywords
Readme
@invisionag/babel-config-ivx
Description
This package provides a baseline configuration for babel as it is being used within our organisation. It adds:
- env, react, flow and stage-2 presets
- react-hot-loader, styled-components and dynamic import plugins
- es5 transformation of module imports for testing
Installation
- Make sure you have all the peer dependencies installed in your project:
- "@babel/core": "^7.8.4",
- "@babel/preset-env": "^7.8.4",
- "babel-plugin-dynamic-import-node": "^2.0.7",
- "babel-preset-flow": "^7.8.3",
- "babel-preset-react": "^7.8.3",
- "babel-preset-stage-2": "^7.8.3"
- Install
@invisionag/babel-config-ivx
as a development dependency.
Usage
In your .babelrc.js
, you can import this config as base config. You can then extend the baseConfig as desired. A simple example that also adds the lodash and idx plugins would look like this:
const baseConfig = require('@invisionag/babel-config-ivx');
module.exports = {
...baseConfig,
plugins: [
...baseConfig.plugins,
"lodash",
"idx",
],
};