Skip to content

importAndResolveDefault

This content is not available in your language yet.

importAndResolveDefault<T>(absPath, options?): Promise<T>

Defined in: core/src/config-loader.ts:287

절대 경로를 file:// URL 로 dynamic import 한 뒤 default export (없으면 namespace 객체) 를 반환한다. 함수형 config 도 허용하므로 객체 또는 함수만 통과.

pathToFileURL 으로 Windows 절대경로 (드라이브 문자) 를 안전하게 처리. config 로더와 CLI 의 --plugin <path> 로더가 공유.

같은 프로세스에서 다중 reload 가 필요한 watch (#2107) 는 별도 cache-bust 적용 예정.

options.allowArraytrue 면 array default export 도 통과 — workspace 처럼 top-level array 가 정상인 호출자용. 기본값은 false (config/플러그인 호환).

T = UserConfig

string

boolean

Promise<T>