简体   繁体   English

babel for node.js 6.9版

[英]babel for node.js version 6.9

I don't know why in some project people use babel for node.js. 我不知道为什么在某些项目中人们将babel用于node.js。 I'm using node 6.9 I can write es6 without any problem, you name the feature, default argument in function, arrow function, rest and spread. 我正在使用节点6.9,我可以毫无问题地编写es6,您可以为功能命名,函数中的默认参数,箭头函数,休息和传播。 Is babel really necessary in node? 在节点中真的需要babel吗?

The only thing I can't do is using import instead of required. 我唯一不能做的就是使用导入而不是必需。

Usually people use babel for node < 6.0 since those versions don't cover es6 that much. 人们通常将babel用于<6.0的节点,因为这些版本的es6覆盖范围不大。

Moreover node 6.9 doesn't cover es6 totally (ex : async/await functions, import syntaxe, ....) 而且节点6.9不能完全覆盖es6(例如:async / await函数,导入语法,..)

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

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