Hello! So I’m pretty new to Vite, but not React, so sorry if this an obvious one. I’ve tried a couple things, but I keep getting the above error in the console along with a blank screen once the app goes to sleep. I’m wondering if there’s a best practice for Glitch or if I’m missing something in the Vite docs (which are a little vague, imo)
My code - [ project removed - 7/24/21 ]
Here’s what’s worked temporarily:
- changing my .env variables to import.meta.env instead of process.env etc. with VITE_ etc.
- adding vite-plugin-environment to my dev dependencies, which allowed me to use process.env without VITE_ (current solution)
I’ve also looked at Vite’s Github and a few people have altered the config file (specifically the mode) but they seem to be dated responses.
Thanks for taking a look