vite-plugin-react-server
Version:
Vite plugin for React Server Components (RSC)
14 lines (13 loc) • 357 B
JavaScript
import { normalizePath } from "vite";
export function resolveManifestEntry(id, manifest) {
// Try exact match
if (manifest[id]) {
return manifest[id].file;
}
// Try normalized path
const normalizedId = normalizePath(id);
if (manifest[normalizedId]) {
return manifest[normalizedId].file;
}
return undefined;
}