node.js - How to use "import" in nodejs v6.11.3 -
this question has answer here:
i want use "import" in nodejs + express app.
i know nodejs v6 support es6.
but can't use "import" in nodejs app.
node give me message. => syntaxerror: unexpected token import
what can es6.
node.js 6 not support esmodules, commonjs modules. can still use esmodules need install babel , transpile code.
Comments
Post a Comment