Does it work with pure ESM projects?

Runtime discovery assumes CommonJS.

Answer

No. Runtime discovery depends on require.cache, a CommonJS loader primitive: in pure ESM projects it simply doesn't exist, so the runtime pipeline can't locate any companion file.