From f57f386f138fe56d7282ba3005450fbde5f6bd49 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 19 Oct 2023 13:20:12 -0500 Subject: [PATCH] fix: content-module-template build extension --- .../src/content/vite-plugin-content-virtual-mod.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts index d70e752b96eb..91281c2e3227 100644 --- a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts +++ b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts @@ -70,13 +70,6 @@ function getContentExtension(index: number) { } } - if (index === 0) { - return undefined; - } - if (index === 1) { - return `` - } - if (index === 2) { return `.entry.mjs` } @@ -155,7 +148,8 @@ export async function generateLookupMap({ readdirSync: fs.readdirSync.bind(fs), }, } - ); + ) + // Run 10 at a time to prevent `await getEntrySlug` from accessing the filesystem all at once. // Each await shouldn't take too long for the work to be noticably slow too.