My expectation was that Vite would make fly’s [env] variables available in import.meta.env
as long as its prefixed with “VITE_”.
This works as expected with secrets, but not with [env].
I’m looking for guidance or better understanding of possible causes.
fly.toml
[env]
VITE_VAR = 'some-var'
fly secrets
VITE_SECRET_VAR=secret
process.env correctly has both.
{
...
VITE_SECRET_VAR: 'secret',
VITE_VAR: 'some-var',
...
}
BUT import.meta.env only contains the variable from secret, but not from [env]
{
VITE_SECRET_VAR: 'secret'
}
Would appreciate any clue here.
Thanks in advance!