mirror of
https://github.com/directus/directus.git
synced 2026-01-26 20:27:58 -05:00
committed by
GitHub
parent
e89a0a4e56
commit
b500c32072
@@ -9,7 +9,9 @@ const _import = new Function('url', 'return import(url)');
|
||||
export default async function loadConfig(): Promise<Record<string, any>> {
|
||||
for (const fileName of CONFIG_FILE_NAMES) {
|
||||
if (await fse.pathExists(fileName)) {
|
||||
const configFile = await _import(path.join(process.cwd(), fileName));
|
||||
const configFile = await _import(
|
||||
path.relative(__dirname, path.join(process.cwd(), fileName)).split(path.sep).join(path.posix.sep)
|
||||
);
|
||||
|
||||
return configFile.default;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user