diff --git a/packages/astro/src/core/render/dev/vite.ts b/packages/astro/src/core/render/dev/vite.ts index 3412f2398..332607ff8 100644 --- a/packages/astro/src/core/render/dev/vite.ts +++ b/packages/astro/src/core/render/dev/vite.ts @@ -3,12 +3,6 @@ import vite from 'vite'; import { unwrapId } from '../../util.js'; import { STYLE_EXTENSIONS } from '../util.js'; -/** - * List of file extensions signalling we can (and should) SSR ahead-of-time - * See usage below - */ -const fileExtensionsToSSR = new Set(['.astro', '.md']); - const STRIP_QUERY_PARAMS_REGEX = /\?.*$/; /** recursively crawl the module graph to get all style files imported by parent id */ @@ -56,12 +50,6 @@ export async function* crawlGraph( if (entryIsStyle && !STYLE_EXTENSIONS.has(npath.extname(importedModulePathname))) { continue; } - if (fileExtensionsToSSR.has(npath.extname(importedModulePathname))) { - const mod = viteServer.moduleGraph.getModuleById(importedModule.id); - if (!mod?.ssrModule) { - await viteServer.ssrLoadModule(importedModule.id); - } - } } importedModules.add(importedModule); }