Wednesday, August 23, 2017

How to disable babel transform-regenerator completely

Leave a Comment

I'm looking for a way to completely disable generator functions transform with babel. With babel 5 there was a blacklist option, but it seems that with babel 6 there is no way to do that (at least I did not find any documentation on the official website).

My current configuration

{   "presets": [     "react",   ],   "plugins": [     "transform-object-rest-spread",      ] } 

Disabling it like described here https://babeljs.io/docs/plugins/transform-regenerator/ did not help.

Any ideas?

1 Answers

Answers 1

Have you tried "exclude"? Like:

{    "presets": [       ["env", {          "exclude": ["transform-regenerator"]       }]    ] } 

Please see https://babeljs.io/docs/plugins/preset-env/#optionsexclude for details.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment