Install both this preset, and the core 'babel-preset-es2015-node4' that it modifies:
$ npm install --save-dev babel-preset-es2015-node4-loose babel-preset-es2015-node4
Why do you need to install both? The idea is that
will always be up to date because it will always use the version of
babel-preset-2015-node4 that you have installed. If you don't want to update to
the latest Babel release - you don't have to. Just pin
the version you need.
$ babel script.js --presets es2015-loose-loose
Via Node API
Does not include regenerator!
If you need it you will have to
npm install and include regenerator yourself:
Note: Regenerator doesn't have a loose mode.