NeahNew/node_modules/next/dist/server/normalizers/request/prefetch-rsc.js
2025-05-03 14:17:46 +02:00

31 lines
903 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PrefetchRSCPathnameNormalizer", {
enumerable: true,
get: function() {
return PrefetchRSCPathnameNormalizer;
}
});
const _constants = require("../../../lib/constants");
const _suffix = require("./suffix");
class PrefetchRSCPathnameNormalizer extends _suffix.SuffixPathnameNormalizer {
constructor(){
super(_constants.RSC_PREFETCH_SUFFIX);
}
match(pathname) {
if (pathname === '/__index' + _constants.RSC_PREFETCH_SUFFIX) {
return true;
}
return super.match(pathname);
}
normalize(pathname, matched) {
if (pathname === '/__index' + _constants.RSC_PREFETCH_SUFFIX) {
return '/';
}
return super.normalize(pathname, matched);
}
}
//# sourceMappingURL=prefetch-rsc.js.map