(path: string)
| 187 | // By using the modification time of the config, we ensure that we pick up any |
| 188 | // changes to the config on reload. |
| 189 | async function importConfig(path: string): Promise<ConfigSpec> { |
| 190 | const {mtimeMs} = await stat(path); |
| 191 | return (await import(`${pathToFileURL(path).href}?${mtimeMs}`)).default; |
| 192 | } |
| 193 | |
| 194 | export async function readConfig(configPath?: string, root?: string): Promise<Config> { |
| 195 | if (configPath === undefined) configPath = await resolveDefaultConfig(root); |