RoadmapShopEvents
Skip to main content

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

Import class

Helpers for resolving and importing Node.js modules.

Signature:
export declare class Import

Methods

MethodModifiersDescription
lazy(moduleName, require)staticProvides a way to improve process startup times by lazy-loading imported modules.
resolveModule(options)staticThis resolves a module path using similar logic as the Node.js require.resolve() API, but supporting extra features such as specifying the base folder.
resolvePackage(options)staticPerforms module resolution to determine the folder where a package is installed.