DEV Community

Discussion on: ES6 is the Node way to go

Collapse
 
mrinasugosh profile image
Mrinalini Sugosh (Mrina)

Yes it should work with module.export.
Just one thing to note:
Many people consider module.exports = ... to be equivalent to export default main; That's not quite true though, or at least not how Babel does it.

ES6 default exports are actually also named exports, except that default is a "reserved" name and there is special syntax support for it as a heads up