pub fn load_from_dir(
        repo_root: &AbsoluteSystemPath,
        package_dir: &AnchoredSystemPath,
    ) -> Result<Option<Self>, Error> {
        let absolute_dir = repo_root.resolve(package_dir);
        // we want to try different paths and then do `from_str`
        let Some((contents, path)) = Self::load_v1_dir(&absolute_dir) else {
            return Ok(None);
        };
        let contents = contents?;
        let mut config = Config::from_str(&contents, path.as_str())?;
        config.filename = path
            .file_name()
            .expect("microfrontends config should not be root")
            .to_owned();
        config.set_path(package_dir);
        Ok(Some(config))
    }
Attempts to load a configuration file from the given directory
Returns `Ok(None)` if no configuration is found in the directory
crates/turborepo-microfrontends/src/lib.rs