1.2.0 • Published 1 year ago
@repay/babel-preset v1.2.0
@repay/babel-preset
Babel preset used by @repaygithub
Usage
Install via the command line using yarn or npm
@babel/core,@babel/runtime, andcore-jsare peer dependencies, which means you must install them yourself.
yarn add --dev @repay/babel-preset @babel/core @babel/runtime core-js
# OR
npm install --save-dev @repay/babel-preset @babel/core @babel/runtime core-jsAdd the preset to your .babelrc or equivalent
{
"presets": ["@repay/babel-preset"]
}EcmaScript Features Supported
- All Proposals that have reached stage-4 and are implemented by
@babel/preset-env Class Properties (does not include private fields)
class Accordian extends Component { state = { isOpen: this.props.openOnMount || false }; // using assignment like below, // `this` references the class instance always toggleOpen = () => this.setState(s => { isOpen: !s.isOpen; }); }Object rest spread (e.g.
let obj = {...props})
Polyfills
There are two options you can pass to control polyfills:
coreJsPolyfill(default:false): When this option istrue, theuseBuiltIns: 'usage'option will be passed into@babel/preset-envto automatically add in only the necessary CoreJS polyfills needed.regeneratorPolyfill(default:false): When this option istrue, theregenerator: trueoption will be passed into the@babel/plugin-transform-runtimeplugin.
1.2.0
1 year ago
1.1.6
1 year ago
1.1.5
3 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.3.0
6 years ago
0.3.0-next.0
6 years ago
0.2.0
7 years ago
0.1.2
7 years ago
0.1.2-testing
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago