does not support ESM packages
The node-resolve is dependent on resolve which in turn, does not support native ESM packages (type=module in package.json) see https://github.com/browserify/resolve/issues/222
As a result, a well-known consumer of node-resolve, the Mr. Dodds' mdx-bundler doesn't properly compile ESM packages. For example, it would compile matcher which is ESM only because it has minimalistic "exports": "./index.js", https://github.com/sindresorhus/matcher/blob/main/package.json#L14 — any other value, including differently-named JS file, will fail in MDX bundler.
If you want to recreate the issue, just tweak the unit test to resolve package.json key exports pointing to anything else than index.js, and of course, make it type: module and without main.
I would prefer waiting for resolve to add esm support
That library is downloaded 58 million times every month, sooner or later they will need to add esm support