From 880e73d94a42b1476fa3a2e611fc5017a3b4bdbd Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Mon, 29 Aug 2022 18:25:14 -0400 Subject: [PATCH] wip: try removing ssrLoadModule on styles --- packages/astro/src/core/render/dev/vite.ts | 12 ------------ 1 file changed, 12 deletions(-) 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); }