1

I've just start an express project and want to use ES6 for both server and client. Currently I'm using a mixed style of require and import.

Should I use import over require in es6 project? Will import replace require in the future? If I want to use import and export in pure es6 way, which export syntax should I use?

Sawyer
  • 15,581
  • 27
  • 88
  • 124
  • ES6 modules are second-class citizens, it depends on what you need, and what tool you use, ie. jspm, Babel, etc. I'd stick to first-class Common modules for the time being, until the ES6 loader standard is finalized. – elclanrs Aug 13 '15 at 02:54
  • 1
    already answered here: http://stackoverflow.com/questions/31354559/using-node-js-require-vs-es6-import-export – edsadr Aug 13 '15 at 03:00

0 Answers0