Home / Function/ resolveConfigPath() — astro Function Reference

resolveConfigPath() — astro Function Reference

Architecture documentation for the resolveConfigPath() function in config.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  59894d9c_2e9c_c54a_8fe0_95c5e156b046["resolveConfigPath()"]
  b7dad900_b555_952f_158e_89aff4cc3f3d["config.ts"]
  59894d9c_2e9c_c54a_8fe0_95c5e156b046 -->|defined in| b7dad900_b555_952f_158e_89aff4cc3f3d
  389cc9ce_16f8_1d39_88ac_521d7093028a["loadConfig()"]
  389cc9ce_16f8_1d39_88ac_521d7093028a -->|calls| 59894d9c_2e9c_c54a_8fe0_95c5e156b046
  f3e6dcfb_5635_0de8_4e8b_3359ffe4dd4b["search()"]
  59894d9c_2e9c_c54a_8fe0_95c5e156b046 -->|calls| f3e6dcfb_5635_0de8_4e8b_3359ffe4dd4b
  style 59894d9c_2e9c_c54a_8fe0_95c5e156b046 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/config/config.ts lines 55–72

export async function resolveConfigPath(
	options: ResolveConfigPathOptions,
): Promise<string | undefined> {
	let userConfigPath: string | undefined;
	if (options.configFile) {
		userConfigPath = path.join(options.root, options.configFile);
		if (!options.fs.existsSync(userConfigPath)) {
			throw new AstroError({
				...AstroErrorData.ConfigNotFound,
				message: AstroErrorData.ConfigNotFound.message(options.configFile),
			});
		}
	} else {
		userConfigPath = await search(options.fs, options.root);
	}

	return userConfigPath;
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does resolveConfigPath() do?
resolveConfigPath() is a function in the astro codebase, defined in packages/astro/src/core/config/config.ts.
Where is resolveConfigPath() defined?
resolveConfigPath() is defined in packages/astro/src/core/config/config.ts at line 55.
What does resolveConfigPath() call?
resolveConfigPath() calls 1 function(s): search.
What calls resolveConfigPath()?
resolveConfigPath() is called by 1 function(s): loadConfig.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free