[web] Simplify variable naming

This commit is contained in:
Alain Nussbaumer 2024-04-27 07:00:08 +02:00
parent fc5563fe9d
commit c255b3a108
1 changed files with 4 additions and 10 deletions

View File

@ -9,7 +9,7 @@ import vue from '@vitejs/plugin-vue'
* *
* export VITE_OWNTONE_URL=http://owntone.local:3689; npm run serve * export VITE_OWNTONE_URL=http://owntone.local:3689; npm run serve
*/ */
const owntoneUrl = process.env.VITE_OWNTONE_URL ?? 'http://localhost:3689' const target = process.env.VITE_OWNTONE_URL ?? 'http://localhost:3689'
export default defineConfig({ export default defineConfig({
build: { build: {
@ -31,15 +31,9 @@ export default defineConfig({
resolve: { alias: { '@': '/src' } }, resolve: { alias: { '@': '/src' } },
server: { server: {
proxy: { proxy: {
'/api': { '/api': { target },
target: owntoneUrl '/artwork': { target },
}, '/stream.mp3': { target }
'/artwork': {
target: owntoneUrl
},
'/stream.mp3': {
target: owntoneUrl
}
} }
} }
}) })