Skip to content

Using module.require #2

Description

@nathanmacinnes

According to the node.js manual:

The module.require method provides a way to load a module as if require() was called from the original module.

Note that in order to do this, you must get a reference to the module object. Since require() returns the exports, and the module is typically only available within a specific module's code, it must be explicitly exported in order to be used.

injectr doesn't support this. This isn't a commonly used feature, so implementing it is low priority.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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