DEV Community

Discussion on: Fastify Autoroutes

Collapse
shair profile image
Shair

Very useful. I have a question, If I am using Javascript without last features, it's possible to use export default instead of module.exports?

Collapse
giovannicardamone profile image
Giovanni Cardamone Author • Edited on

'export default' is part of the ES6 module system, so to use it you need a javascript runtime that support it, or you can transpile from highter version to lower using babel.

Anyway the library support both.

Thanks for the question i hope i answered it in a clear way :)