Skip to content

node-resolve incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name #51

@fresheneesz

Description

@fresheneesz

I have a situation (real-world, this exists in the http-proxy module), where the following two things are in the same directory:

http-proxy.js - a file
http-proxy - a folder containing an 'index.js' file

http-proxy.js contains require('./http-proxy/'), which node.js resolves to ./http-proxy/index.js. node-resolve on the other hand, incorrectly resolves it to ./http-proxy.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions