diff --git a/packages/astro/src/vite-plugin-scanner/scan.ts b/packages/astro/src/vite-plugin-scanner/scan.ts index 9767d971a85d..a3f8c717d4c1 100644 --- a/packages/astro/src/vite-plugin-scanner/scan.ts +++ b/packages/astro/src/vite-plugin-scanner/scan.ts @@ -10,6 +10,9 @@ type BuiltInExports = Exclude; // Quick scan to determine if code includes recognized export // False positives are not a problem, so be forgiving! function includesExport(code: string) { + for (const name of BOOLEAN_EXPORTS) { + if (code.includes(name)) return true; + } return code.includes('export const'); }