babel-plugin-transform-promise-to-rsvp
This plugin transforms Promise
to rvsp
.
Example
{ const taskA = ; const taskB = ; return PromisealltaskA taskB;}
Gets converted to:
; { const taskA = ; const taskB = ; return ;}
Usage
- Install rsvp:
npm install --save rsvp
- Install the promise-to-rsvp plugin:
npm install --save-dev babel-plugin-transform-promise-to-rsvp
- Add transform-promise-to-rsvp to your .babelrc file:
If you'r using the transform-runtime plugin add transform-promise-to-rsvp before transform-runtime: