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.
Parameters
Section titled “Parameters”filePath
Section titled “filePath”string
Returns
Section titled “Returns”Promise<Record<string, any>>
A promise that resolves to the imported module