|
|
@ -180,14 +180,9 @@ async function resolveUserConfig(
|
|
|
|
mode: string
|
|
|
|
mode: string
|
|
|
|
): Promise<[UserConfig, string | undefined]> {
|
|
|
|
): Promise<[UserConfig, string | undefined]> {
|
|
|
|
// load user config
|
|
|
|
// load user config
|
|
|
|
let configPath
|
|
|
|
const configPath = supportedConfigExtensions
|
|
|
|
for (const ext of supportedConfigExtensions) {
|
|
|
|
.map((ext) => resolve(root, `config.${ext}`))
|
|
|
|
const p = resolve(root, `config.${ext}`)
|
|
|
|
.find(fs.pathExistsSync)
|
|
|
|
if (await fs.pathExists(p)) {
|
|
|
|
|
|
|
|
configPath = p
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const userConfig: RawConfigExports = configPath
|
|
|
|
const userConfig: RawConfigExports = configPath
|
|
|
|
? ((
|
|
|
|
? ((
|
|
|
|