How to get `require.main.filename` like Node as Deno
I am making a module to be published on deno.land/x. I want the user to put a file describing the configuration for the module on the same level as the entrypoint file. I could not figure out how to get the entrypoint filename from the module side. In Node.js, require.main.filenamerequire.main.filename seems to solve this. How would this be appropriate to write in Deno?
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
D
Deno
Chat about Deno, a modern runtime for JavaScript and TypeScript.