UNPKG

1.28 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../../next-server/server/get-page-files.ts"],"names":["getPageFiles","buildManifest","page","normalizedPage","files","pages","console","warn"],"mappings":"uEAAA,wDAcO,QAASA,CAAAA,YAAT,CACLC,aADK,CAELC,IAFK,CAGc,CACnB,KAAMC,CAAAA,cAAc,CAAG,2CAAoB,yCAAkBD,IAAlB,CAApB,CAAvB,CACA,GAAIE,CAAAA,KAAK,CAAGH,aAAa,CAACI,KAAd,CAAoBF,cAApB,CAAZ,CAEA,GAAI,CAACC,KAAL,CAAY,CACVE,OAAO,CAACC,IAAR,CACG,4BAA2BJ,cAAe,+BAD7C,EAGA,MAAO,EAAP,CACD,CAED,MAAOC,CAAAA,KAAP,CACD","sourcesContent":["import { normalizePagePath, denormalizePagePath } from './normalize-page-path'\n\nexport type BuildManifest = {\n devFiles: readonly string[]\n ampDevFiles: readonly string[]\n polyfillFiles: readonly string[]\n lowPriorityFiles: readonly string[]\n pages: {\n '/_app': readonly string[]\n [page: string]: readonly string[]\n }\n ampFirstPages: readonly string[]\n}\n\nexport function getPageFiles(\n buildManifest: BuildManifest,\n page: string\n): readonly string[] {\n const normalizedPage = denormalizePagePath(normalizePagePath(page))\n let files = buildManifest.pages[normalizedPage]\n\n if (!files) {\n console.warn(\n `Could not find files for ${normalizedPage} in .next/build-manifest.json`\n )\n return []\n }\n\n return files\n}\n"]}
\No newline at end of file