Requiring modules in Node.js: Everything you need to know
Samer Buna
6K29

Do you know is there anything wrong with using require in the export of a module, like so?

module.exports = {
logger: require('some-logger'),
packet: require('some-packet'),
fetch: require('some-fetch'),
protocols: {
stream: require('some-protocol-stream')
}
}

It feels odd, but as far as I can tell behaves as I would expect it to.