2022-07-16 06:18:17 +02:00
|
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
import path from 'path';
|
|
|
|
|
|
|
|
/** @type {import('vite').UserConfig} */
|
|
|
|
const config = {
|
2023-07-01 06:50:47 +02:00
|
|
|
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()],
|
2022-07-16 06:18:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|