Why use .env files? While building our web app, we might need to store sensitive information such as API keys, database passwords, and other variables that are required for the application to run. Now we wouldn't want such information to be hard-code...

Markdown supported · ⌘↵ to post
Abhrajit Ray
Thanks, man I have been struggling with this for a long time. After ChatGPT, I just forgot that you could find solutions in such beautiful articles.
Thanks for this infomation , it is really helpful but i have a question
in the situation where you omit the VITE when importing your variables , will your program still works fine or it will break
Pat-Idehen Miracle
Frontend developer
It does work for development, but not on deployment. Tried both on Vercel and Netlify.