1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-22 01:47:08 +02:00
immich/web/vite.config.js
Jason Rasmussen f55b3add80
chore(web): prettier (#2821)
Co-authored-by: Thomas Way <thomas@6f.io>
2023-06-30 23:50:47 -05:00

29 lines
678 B
JavaScript

import { sveltekit } from '@sveltejs/kit/vite';
import path from 'path';
/** @type {import('vite').UserConfig} */
const config = {
resolve: {
alias: {
'xmlhttprequest-ssl': './node_modules/engine.io-client/lib/xmlhttprequest.js',
'@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()],
};
export default config;