简体   繁体   English

ES6到ES5的转发器

[英]ES6 to ES5 transpilers

Are there are any notable problems or things to be aware of when introducing an ES6 to ES5 transpiler into a build pipeline? 在将ES6引入ES5转换器到构建管道时,是否有任何值得注意的问题或事项需要注意?

Are these things mature enough for use in a commercial setting? 这些东西是否足够成熟,可以在商业环境中使用?

I have not had any issues with Traceur. 我与Traceur没有任何问题。 You will not have access to the whole ES6 specification in Traceur (some features such as 'let' are missing) and some experimental features should be disabled for now. 您将无法访问Traceur中的整个ES6规范(某些功能,例如“let”缺失),现在应禁用某些实验性功能。

The usual considerations when switching languages apply. 适用于切换语言时的常见注意事项。 ES6 feels a little bit like CoffeeScript in the sense that the language is not backward compatible. ES6感觉有点像CoffeeScript,因为语言不向后兼容。 You can't just take a piece of uncompiled ES6 and pass it to someone running ES5 because you'll be using arrow functions and other unsupported syntax. 你不能只拿一块未编译的ES6并将其传递给运行ES5的人,因为你将使用箭头函数和其他不受支持的语法。

Traceur compiles to ES5, so IE8 is not supported. Traceur编译为ES5,因此不支持IE8。

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

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