If you define environment variables in the netlify.toml only the build.environment variables are being used.
Eg:
[build.environment]
GREETING="Hello World! I am a variable set in a .env file"
# When building on the production environment this variable will NOT be used.
[context.production.environment]
GREETING="production greeting"
If you define environment variables in the netlify.toml only the
build.environmentvariables are being used.Eg: