importConfig = async (configFile) => {
  const resolvedPath = path.resolve(configFile);
  const imported = await import(url.pathToFileURL(resolvedPath).toString());
  const config = imported.default;

  if (config == null || typeof config !== 'object' || Array.isArray(config)) {
    throw Error(`Invalid config file "${configFile}"`);
  }
  return config;
}
@param {string} configFile
@returns {Promise<import('./types.js').Config>}