Files
Webklar.com/node_modules/next/dist/esm/server/load-manifest.js
Basilosaurusrex f027651f9b main repo
2025-11-24 18:09:40 +01:00

18 lines
481 B
JavaScript

import { readFileSync } from "fs";
const cache = new Map();
export function loadManifest(path, shouldCache = true) {
const cached = shouldCache && cache.get(path);
if (cached) {
return cached;
}
const manifest = JSON.parse(readFileSync(path, "utf8"));
if (shouldCache) {
cache.set(path, manifest);
}
return manifest;
}
export function clearManifestCache(path) {
return cache.delete(path);
}
//# sourceMappingURL=load-manifest.js.map