import { ContentEntryType, DataEntryType } from 'astro' import path from 'path'; export function posixifyPath(filePath: string) { return filePath.split(path.sep).join('/'); } export function posixRelative(from: string, to: string) { return posixifyPath(path.relative(from, to)); } export function getEntryConfigByExtMap( entryTypes: TEntryType[], ): Map { const map = new Map(); for (const entryType of entryTypes) { for (const ext of entryType.extensions) { map.set(ext, entryType); } } return map; }