eCR Viewer
    Preparing search index...

    Interface RequireResolve

    interface RequireResolve {
        paths(request: string): null | string[];
        (request: string, options?: RequireResolveOptions): string;
    }
    • Use the internal require() machinery to look up the location of a module, but rather than loading the module, just return the resolved filename.

      If the module can not be found, a MODULE_NOT_FOUND error is thrown.

      Parameters

      Returns string

      v0.3.0

    Index

    Methods

    Methods

    • Returns an array containing the paths searched during resolution of request or null if the request string references a core module, for example http or fs.

      Parameters

      • request: string

        The module path whose lookup paths are being retrieved.

      Returns null | string[]

      v8.9.0