Skip to content

module: require relative from package root #1979

Closed
@KoryNunn

Description

@KoryNunn

Hope this hasn't been raised before, i did search..

Everyone has done this:

    var thing = require('../../../../thing');

Why not add a symbol that resolves to the closest package.json?

    var thing = require('^/thing');

Doesn't have to be a ^.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions