chore: run web (only) with remote backend (#2196)

This commit is contained in:
Jason Rasmussen 2023-04-07 21:44:56 -04:00 committed by GitHub
parent ab5b92ae68
commit 1f17720be2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View file

@ -9,6 +9,19 @@ const config = {
'@api': path.resolve('./src/api')
}
},
server: {
// connect to a remote backend during web-only development
proxy: {
'/api': {
target: process.env.PUBLIC_IMMICH_SERVER_URL,
secure: true,
changeOrigin: true,
logLevel: 'debug',
rewrite: (path) => path.replace(/^\/api/, ''),
ws: true
}
}
},
plugins: [sveltekit()]
};