It's a very odd case, but if there's something like: ``` // index.js // package.json { main: "bad.js" } ``` Then we Node will resolve to `index.js` and we won't need `package.json` at all. Additionally, if `package.json` resolves to `.`, `./`, `index`, `index.js|mjs`, etc. we could just exclude it as without it we get the same resolution rules.
It's a very odd case, but if there's something like:
Then we Node will resolve to
index.jsand we won't needpackage.jsonat all.Additionally, if
package.jsonresolves to.,./,index,index.js|mjs, etc. we could just exclude it as without it we get the same resolution rules.