I'm currently rewriting some internal packages as ECMAScript modules. Unfortunately, I depend on some external packages that use esm syntax but .js file endings. Of course, they have neither "exports" nor "type": "module" defined in their package.json. I cannot update these external dependencies to new versions.
How can I tell node.js to treat these .js files as esm modules?