S
SolidJS13mo ago
rmacfie

.env.local not working

According to Vite's documentation (https://vitejs.dev/guide/env-and-mode) I should be able to use a file .env.local . However, I am not able to use any values from .env.local at all in a solid-start application. What's going on?
Vite
Next Generation Frontend Tooling
3 Replies
Grahf
Grahf13mo ago
I'm not sure but I've used env.development files on my local host and that's worked and make sure you restart the app after adding the env file
rmacfie
rmacfieOP13mo ago
I can't get anything to work other than putting everything in .env. I wonder if there's anything in solid-start or vinxi that influences this behavior? In a vanilla vite-app it works just as documented.
urish
urish13mo ago
as a workaround, I'm using:
dotenvx run -f .env.local -f .env -- vinxi dev
dotenvx run -f .env.local -f .env -- vinxi dev

Did you find this page helpful?