DEV Community

Discussion on: Using secure environment variables in SvelteKit and Netlify

rchrdnsh profile image

This is helpful, thank you. How do I access the variable inside a page, tho?

brewhousedigital profile image
Brewhouse Digital Author

Hi rchrdnsh! I haven't tested this but SvelteKit's FAQ has a section on referencing your environment variables inside your pages and components. Looks like you have to prefix it with the text "VITE_"
Hope this helps.