S
S
Svyatoslav Khusamov2016-07-23 15:39:22
Node.js
Svyatoslav Khusamov, 2016-07-23 15:39:22

Will Node.js implement import and export?

That is, so that instead of module.exports you can write an export statement, and instead of require() - an import statement.
I was looking at the ES2015 roadmap on the node.green site and couldn't find any information regarding the module import/export implementation. Did they decide to defer this to the next version of the spec?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Yarosh, 2016-07-23
@voidnugget

node --v8-options | grep "in progress"
In principle, there is support for es6 modules via the --harmony flag, but it's better to use polyfills or SystemJS .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question