modules

Using Babel to import/export ES2015 modules in Node.js

Using Babel to import/export ES2015 modules in Node.js

  • August 15, 2017

Using “require” statements (commonJS syntax) in your server side code while writing “import” and “export” statements (ES2015 syntax) for your front end makes writing javascript a bit weird. The reason for not having import and export statements for modules is that node parses modules a bit differently than how they...