S
SolidJS5mo 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
Grahf5mo 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
rmacfie5mo 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
urish5mo 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