troygoode / node-require-directory

Recursively iterates over specified directory, requiring each file, and returning a nested hash structure containing those libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

after changing extensions to .mjs and adding -r esm getting error module not defined.

xs2bharat opened this issue · comments

Hi

I am pretty new to node.
After changing module file extensions from ".js" to ."mjs" and adding -r esm arguments to node, I am getting error "module" is not defined.

Do you know how to add esm support?