Home > @rushstack/node-core-library > RealNodeModulePathResolver
RealNodeModulePathResolver class
This class encapsulates a caching resolver for symlinks in node_modules directories. It assumes that the only symlinks that exist in input paths are those that correspond to npm packages.
Signature:
export declare class RealNodeModulePathResolver
Remarks
In a repository with a symlinked node_modules installation, some symbolic links need to be mapped for node module resolution to produce correct results. However, calling fs.realpathSync.native on every path, as is commonly done by most resolvers, involves an enormous number of file system operations (for reference, each invocation of fs.realpathSync.native involves a series of fs.readlinkSync calls, up to one for each path segment in the input).
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| (input: string) => string | Similar in function to |
Methods
Method | Modifiers | Description |
|---|---|---|
Clears the cache of resolved symlinks. |