diff --git a/apps/site/components/Common/Supporters/index.tsx b/apps/site/components/Common/Supporters/index.tsx index 06dddf7f23b44..d06abd357840b 100644 --- a/apps/site/components/Common/Supporters/index.tsx +++ b/apps/site/components/Common/Supporters/index.tsx @@ -1,5 +1,7 @@ import Avatar from '@node-core/ui-components/Common/AvatarGroup/Avatar'; +import { getAcronymFromString } from '#site/util/string'; + import type { Supporter } from '#site/types'; import type { FC } from 'react'; @@ -12,6 +14,7 @@ const SupportersList: FC = ({ supporters }) => ( {supporters.map(({ name, image, profile }, i) => ( { // Keeps the map of pathnames to filenames const pathnameToFilename = new Map(); + // Pre-compute the pages directory path to avoid Turbopack's overly broad + // file pattern analysis when using path.join() with dynamic segments + const pagesDirectory = join(process.cwd(), 'pages'); + const websitePages = await getMarkdownFiles( process.cwd(), `pages/${defaultLocale.code}` @@ -101,7 +105,7 @@ const getDynamicRouter = async () => { // meaning that the route exists on the website and can be rendered if (pathnameToFilename.has(normalizedPathname)) { const filename = pathnameToFilename.get(normalizedPathname); - const filepath = join(process.cwd(), 'pages', locale, filename); + const filepath = normalize(`${pagesDirectory}/${locale}/${filename}`); // We verify if our Markdown cache already has a cache entry for a localized // version of this file, because if not, it means that either diff --git a/apps/site/types/supporters.ts b/apps/site/types/supporters.ts index 5da04e07c50ca..ea7b06008cfbd 100644 --- a/apps/site/types/supporters.ts +++ b/apps/site/types/supporters.ts @@ -2,7 +2,7 @@ export type Supporter = { name: string; image: string; url: string; - profile: string; + profile?: string; source: T; };