reach-et-babel-setup
v1.7.2
Published
standard setup for ET projects
Downloads
15
Readme
reach-et-babel-setup
Sets standard Babel config for Reach ET builds. Includes the following:
Plugins
- @babel/plugin-transform-destructuring
- @babel/plugin-syntax-dynamic-import
- @babel/plugin-proposal-object-rest-spread
- @babel/plugin-transform-regenerator
- @babel/plugin-proposal-class-properties
- @babel/plugin-proposal-private-methods
- babel-plugin-date-fns
- babel-plugin-lodash
Presets:
Install
npm i reach-et-babel-setup --save-dev
Usage
Create a .babelrc.js file and add the following:
const babelConfig = require('reach-et-babel-setup');
module.exports = babelConfig();
If you want to tweak the @babel/preset-env then you can pass it into the config like so:
const babelConfig = require('reach-et-babel-setup');
module.exports = babelConfig({
// Defaults
debug: false,
corejs: 3,
modules: 'auto',
useBuiltIns: 'usage'
});
Copyright (c) 2019 "Reach Shared Services Ltd"