async function fileLoader(rootDir) {
	const componentPaths = await findSvelteComponents(rootDir);
	const results = await Promise.all(
		componentPaths.map(async (componentPath) => ({
			include: await isLibraryComponent(
				await fs.readFile(componentPath).then((p) => p.toString())
			).catch((e) => {
				throw new Error(`Error while identifying ${componentPath}`, { cause: e });
			}),
			// Get the name of the component, takes the last part of the path and removes the file extension
			componentName: path.basename(componentPath, path.extname(componentPath))
		}))
	);

	return results.filter((r) => r.include).map((r) => r.componentName);
}
@param {string} rootDir

@returns {Promise<string[]>}