(
filename: string,
overrides: SnowpackUserConfig = {},
)
| 777 | } |
| 778 | |
| 779 | async function loadConfigurationFile( |
| 780 | filename: string, |
| 781 | overrides: SnowpackUserConfig = {}, |
| 782 | ): Promise<{filepath: string | undefined; config: SnowpackUserConfig} | null> { |
| 783 | const loc = path.resolve(overrides.root || process.cwd(), filename); |
| 784 | if (!existsSync(loc)) return null; |
| 785 | const config = await REQUIRE_OR_IMPORT(loc); |
| 786 | return {filepath: loc, config}; |
| 787 | } |
| 788 | |
| 789 | export async function loadConfiguration( |
| 790 | overrides: SnowpackUserConfig = {}, |