Is it possible write a gulpfile in es6?

前端 未结 6 2067
终归单人心
终归单人心 2020-12-23 09:52

Question: How can I write my gulp file in ES6 so I can use import instead of require and use => syntax over

6条回答
  •  一个人的身影
    2020-12-23 10:13

    Note you can now use many/most ES6 features in Node.js v4.0.0 without babel. However apparently 'import' is still not supported. See: https://nodejs.org/en/docs/es6/

    Edit: Most of the popular ES6 features (including destructuring and spread) are supported by default in NodeJS 5.0 (see above link.) The only major missing feature appears to be ES6 modules as far as I can tell.

提交回复
热议问题