Using Node.js require vs. ES6 import/export
In a project I'm collaborating on, we have two choices on which module system we can use:
- Importing modules using
require
, and exporting usingmodule.exports
andexports.foo
. - Importing modules using ES6
import
, and exporting using ES6export
Are there any performance benefits to using one over the other? Is there anything else that we should know if we were to use ES6 modules over Node ones?