Skip to content

Commit

Permalink
Merge pull request photoview#368 from photoview/update-ui-dependencies
Browse files Browse the repository at this point in the history
Update UI dependencies
  • Loading branch information
viktorstrate authored May 12, 2021
2 parents 538835c + c1d54f3 commit b60c15c
Show file tree
Hide file tree
Showing 4 changed files with 1,430 additions and 1,027 deletions.
9 changes: 7 additions & 2 deletions ui/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ const bs = browserSync.create()
const production = process.env.NODE_ENV == 'production'
const watchMode = process.argv[2] == 'watch'

const ENVIRONMENT_VARIABLES = ['NODE_ENV', 'PHOTOVIEW_API_ENDPOINT', 'VERSION', 'BUILD_DATE', 'COMMIT_SHA']
const ENVIRONMENT_VARIABLES = [
'NODE_ENV',
'PHOTOVIEW_API_ENDPOINT',
'VERSION',
'BUILD_DATE',
'COMMIT_SHA',
]

const defineEnv = ENVIRONMENT_VARIABLES.reduce((acc, key) => {
acc[`process.env.${key}`] = process.env[key] ? `"${process.env[key]}"` : null
Expand All @@ -31,7 +37,6 @@ const esbuildOptions = {
format: 'esm',
bundle: true,
platform: 'browser',
target: ['chrome58', 'firefox57', 'safari11', 'edge16'],
splitting: true,
minify: production,
sourcemap: !production,
Expand Down
Loading

0 comments on commit b60c15c

Please sign in to comment.