Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
No EOL
908 B
Text
17 lines
No EOL
908 B
Text
import { removeTrailingSlash } from './remove-trailing-slash';
|
|
import { addPathPrefix } from './add-path-prefix';
|
|
import { addPathSuffix } from './add-path-suffix';
|
|
import { addLocale } from './add-locale';
|
|
export function formatNextPathnameInfo(info) {
|
|
let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix);
|
|
if (info.buildId || !info.trailingSlash) {
|
|
pathname = removeTrailingSlash(pathname);
|
|
}
|
|
if (info.buildId) {
|
|
pathname = addPathSuffix(addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json');
|
|
}
|
|
pathname = addPathPrefix(pathname, info.basePath);
|
|
return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname);
|
|
}
|
|
|
|
//# sourceMappingURL=format-next-pathname-info.js.map |