admin管理员组文章数量:1194605
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 / did not help.
Any ideas?
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?
Share Improve this question edited May 14, 2017 at 10:53 Mihail asked May 14, 2017 at 0:00 MihailMihail 6185 silver badges16 bronze badges 3 |1 Answer
Reset to default 27 +125Have you tried "exclude"? Like:
{
"presets": [
["env", {
"exclude": ["transform-regenerator"]
}]
]
}
Please see https://babeljs.io/docs/plugins/preset-env/#optionsexclude for details.
本文标签: javascriptHow to disable babel transformregenerator completelyStack Overflow
版权声明:本文标题:javascript - How to disable babel transform-regenerator completely - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738504042a2090434.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
react
preset in your current configuration which doesn't includetransform-regenerator
plugin in the first place. – Leonid Beschastny Commented Aug 17, 2017 at 8:45transform-generator
plugin. I'm not sure how'd you'd get thetransform-generator
plugin in the first place unless you have theenv
preset or something else. – Andrew Li Commented Aug 19, 2017 at 20:23