Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

use import in node

In the package.json file add "type" : "module", . Adding this enables ES6 modules.

//This will enable you to use import statements without any errors
 
PREVIOUS NEXT
Tagged: #import #node
ADD COMMENT
Topic
Name
6+6 =