importModule
importModule<
T>(id,resolvePaths?):Promise<T>
Defined in: packages/node/src/module/import-module.ts:12
Import module at runtime with custom resolve paths.
If used, 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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string
The module to load
resolvePaths?
Section titled “resolvePaths?”string[]
The paths to use to resolve the module
Returns
Section titled “Returns”Promise<T>
The loaded module