简体   繁体   English

如何在没有Regenerator运行时的情况下使用Babel 6

[英]How to use Babel 6 without Regenerator runtime

I've been using Babel 6 in my latest project, and have a simple script that is distributed to our users. 我在最新项目中一直使用Babel 6,并且有一个简单的脚本分发给我们的用户。 However, our legal team won't allow distributing code that includes the Facebook BSD-style license ( read: https://news.ycombinator.com/item?id=8985541 ), which is causing a problem since Babel includes the Facebook regenerator-runtime . 但是,我们的法律团队将不允许分发包含Facebook BSD样式许可证的代码(请参阅: https : //news.ycombinator.com/item?id=8985541 ),由于Babel包含了Facebook regenerator-runtime ,因此这引起了问题。 regenerator-runtime

I've double-checked, and the regenerator-runtime is included in babel-core . 我已经仔细检查过,并且babel-core regenerator-runtime包含在babel-core Is there any way around including this dependency, or a way to replace it with another? 是否有任何方法可以包含此依赖项,或者可以用另一种方法替代它?

您可以使用babel-preset-es2015-without-regenerator ,它将按原样输出生成器功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM