Skip to content

PSA: Node 13.1.0 will have built-in functionality that obsoletes this package #16

@dead-claudia

Description

@dead-claudia

See: nodejs/node#29327

Starting with Node 13.1.0, if you pass --experimental-resolve-self, Node will resolve require("pkg") to the parent package provided the nearest package.json has a matching "name": "pkg" field.

Concretely, this means require("this") would just become require("my-package") under this scheme. This also works with multiple different packages simultaneously, while this does not as it doesn't remove itself from the cache before returning.


There is nothing you need to do as part of this issue, and you may feel free to close it immediately. I just wanted to let you know this is an upcoming thing so you could be aware of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions