fool
September 14, 2020, 11:56pm
2
Hiya @lyesui and welcome to our community! Indeed, .env does not magically work here. Please check out this article on correct environment variable usage at Netlify:
Last reviewed: August 2023
The preferred way to use environment variables in Netlify is to set them in our environment - be that in the Environment Variables settings UI (on the site’s “Build & Deploy settings” page), or via netlify.toml . You’ll want to choose the right pattern to meet your needs. Setting variables in our UI may be considered a bit more secure, since only people with access to the Netlify admin UI for your site can see them, rather than “anyone who can clone your repo!”.
Thes…