Skip to content

resolveModule

resolveModule(id, resolvePaths?): string | null

Defined in: packages/node/src/module/resolve-module.ts:14

Resolve a module id to its full path.

If defined, the resolve paths will be used instead of the default node.js ones, except for the GLOBAL_FOLDERS like $HOME/.node_modules, which are always included.

string

Module identifier

string[]

Optional paths to use to resolve the module

string | null

The resolved module path, or null if it cannot be found.