In pages/index.astro
if I try
---
console.log(location.href)
---
Error in text:
[plugin:astro] location is not defined
export statements in
.astro
files do not have access to local variable declarations, only imported values.
How can I access or import location from a AstroJs page?