You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I tried sensitive information to fetch as mentioned like example here but i am getting undefined
const SECRET_KEY = process.env.SECRET_KEY;
https://import-meta-env.org/guide/extra-topic/sensitive-environment-variables.html
what i want is i don't want to expose this in public so i didn't add here in .env.example that variable SECRET_KEY
i am expecting Test123
i am setting
"preview": "cross-env SECRET_KEY =Test123 import-meta-env -x .env.example.public && vite preview"
is there any example to read sensitive information in vite react without exposing in front end .Thanks.
Beta Was this translation helpful? Give feedback.
All reactions