Skip to content

importExternalFile

importExternalFile(filePath): Promise<Record<string, any>>

Defined in: core/dist/utils/fileUtils.d.ts:92

Dynamically imports a module from a file path from the outside of the installation dir. .ts modules are loaded through jiti (Node’s native dynamic import() cannot load TypeScript), so .gsloth.config.ts honours the same async configure() contract as .js/.mjs. All other extensions use native dynamic import.

string

Promise<Record<string, any>>

A promise that resolves to the imported module