mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 20:59:03 +00:00
UI Building: only add environment variable if it's defined
This commit is contained in:
@@ -11,7 +11,9 @@ const watchMode = process.argv[2] == 'watch'
|
||||
const ENVIRONMENT_VARIABLES = ['NODE_ENV', 'PHOTOVIEW_API_ENDPOINT']
|
||||
|
||||
const defineEnv = ENVIRONMENT_VARIABLES.reduce((acc, key) => {
|
||||
acc[`process.env.${key}`] = `"${process.env[key]}"`
|
||||
if (process.env[key]) {
|
||||
acc[`process.env.${key}`] = `"${process.env[key]}"`
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user