Skip to content

Latest commit

 

History

History
120 lines (58 loc) · 1.81 KB

File metadata and controls

120 lines (58 loc) · 1.81 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > Import

Import class

Helpers for resolving and importing Node.js modules.

Signature:

export declare class Import 

Methods

Method

Modifiers

Description

lazy(moduleName, require)

static

Provides a way to improve process startup times by lazy-loading imported modules.

resolveModule(options)

static

This resolves a module path using similar logic as the Node.js require.resolve() API, but supporting extra features such as specifying the base folder.

resolveModuleAsync(options)

static

Async version of Import.resolveModule()<></>.

resolvePackage(options)

static

Performs module resolution to determine the folder where a package is installed.

resolvePackageAsync(options)

static

Async version of Import.resolvePackage()<></>.