ling-open-studio / node_modules /next /dist /shared /lib /page-path /normalize-data-path.js
GitHub Action
Deploy from GitHub Actions: df5a8ff24af4958ea227f47605368fc710dfbfa8
c592d77
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizeDataPath", {
enumerable: true,
get: function() {
return normalizeDataPath;
}
});
const _pathhasprefix = require("../router/utils/path-has-prefix");
function normalizeDataPath(pathname) {
if (!(0, _pathhasprefix.pathHasPrefix)(pathname || '/', '/_next/data')) {
return pathname;
}
pathname = pathname.replace(/\/_next\/data\/[^/]{1,}/, '').replace(/\.json$/, '');
if (pathname === '/index') {
return '/';
}
return pathname;
}
//# sourceMappingURL=normalize-data-path.js.map