Node.js will treat the following as ES modules when passed to node as the initial input, or when referenced by import: Files ending in .mjs. Files ending in .js, or extensionless files, when the nearest parent package.json file contains a top-level field "type" with a value of "module". Strings passed in as an argument to --eval or piped to node via STDIN, with the flag --input-type=module. Node.j