[v18.x] esm: fix `--specifier-resolution=node` not preserving symlinks
Fixes https://github.com/nodejs/node/issues/47649
When you combine --experimental-specifier-resolution=node
and --preserve-symlinks
imports that were valid in node 14 fail.
While I recognise that this behaviour is experimental, and indeed removed in node 19, swapping to a loader for the simple case of appending .js
is quite a bit of effort - even if that effort will eventually need to be made.