fastify.register(require('./our-db-connector'))
vs
const requireHere = require('./our-db-connector');
fastify.register(requireHere)
I see fastify document is using the require as an argument for CommonJs. However, for ES6 import syntax, they use it as top level. What are the reasons for this?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/9slSWip
Comments
Post a Comment