In pages/index.astro if I try Then I get 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? Answer location is a browser global. It doesn’t exist in Node, which your Astro site will be
Tag: astrojs
Using React packages in Astro
So I’ve started building a portfolio site for myself, gone with Astro as it’s now the cool new thing, so thought why not, was going to use Gatsby but this seems like the more performant solution and you have a lot of freedom with it (not tied in to a GQL CMS). As I understand it, Astro is a solution