Hello guys, I'm new to Vite and I'm trying to use a .env variable to store a URL and use it with axios to get some data, but it returns undefined every single time. The URL is working and I get data if I don't use the .env variable.
.env
undefined
Solved, problem was my .env file was inside src folder and based on the Vite documentation the .env files should be in root.
Now its working.