diff --git a/packages/astro/src/vite-plugin-astro-server/css.ts b/packages/astro/src/vite-plugin-astro-server/css.ts index 9a4133f3d1bf..af147048a0b9 100644 --- a/packages/astro/src/vite-plugin-astro-server/css.ts +++ b/packages/astro/src/vite-plugin-astro-server/css.ts @@ -9,7 +9,7 @@ interface ImportedStyle { content: string; } -const inlineQueryRE = /(?:\?|&)inline(?:$|&)/ +const inlineQueryRE = /(?:\?|&)inline(?:$|&)/; /** Given a filePath URL, crawl Vite’s module graph to find all style imports. */ export async function getStylesForURL( @@ -34,7 +34,7 @@ export async function getStylesForURL( } // Else try to load it else { - let modId = importedModule.url + let modId = importedModule.url; // Mark url with ?inline so Vite will return the CSS as plain string, even for CSS modules if (!inlineQueryRE.test(importedModule.url)) { if (importedModule.url.includes('?')) {