get-page-files.js 708 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.getPageFiles = getPageFiles;
  6. var _denormalizePagePath = require("../shared/lib/page-path/denormalize-page-path");
  7. var _normalizePagePath = require("../shared/lib/page-path/normalize-page-path");
  8. function getPageFiles(buildManifest, page) {
  9. const normalizedPage = (0, _denormalizePagePath).denormalizePagePath((0, _normalizePagePath).normalizePagePath(page));
  10. let files = buildManifest.pages[normalizedPage];
  11. if (!files) {
  12. console.warn(`Could not find files for ${normalizedPage} in .next/build-manifest.json`);
  13. return [];
  14. }
  15. return files;
  16. }
  17. //# sourceMappingURL=get-page-files.js.map