Skip to content

Commit

Permalink
fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ottomated committed Aug 29, 2023
1 parent 07b6b4e commit 2391b63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/astro/src/vite-plugin-scanner/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ type BuiltInExports = Exclude<keyof PageOptions, 'custom'>;
// 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');
}

Expand Down

0 comments on commit 2391b63

Please sign in to comment.