refactor: make code clean

pull/918/head
CHOYSEN 3 years ago
parent 3e0c5e406d
commit e249cd4784

@ -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
? (( ? ((

Loading…
Cancel
Save