search

Home  >  Q&A  >  body text

node.js - 为什么Nodejs未支持import、export ES6特性?

在nodejs官网上看到最新版的nodejs对于es6的语法支持已经足够好了,但是没看到import、export的支持。我们还是得用require、module.exports。既然es6已经对模块化有了规范。感觉前后端应该统一使用。那么nodejs未来会支持么?

迷茫迷茫2784 days ago626

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-04-17 15:10:02

    import, export are only drafts and have not been passed

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 15:10:02

    1. Personally, I think there is no problem in unifying language and standards

    2. There are still differences in the usage scenarios of the front and back ends. Although they are both JS, they do not necessarily have to be unified

    3. It is likely to be supported in the future

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 15:10:02

    Future support is for sure.
    Upgrading a new feature often requires compatibility with older versions of the code.
    If you need to use the latest features, it is recommended to use io.js

    reply
    0
  • Cancelreply