import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
const apiTarget = process.env.VITE_API_TARGET || 'http://localhost:5000';
export default defineConfig({
    plugins: [vue()],
    resolve: {
        alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
        extensions: ['.ts', '.tsx', '.vue', '.js', '.jsx', '.json']
    },
    server: { proxy: { '/api': apiTarget } },
    preview: { proxy: { '/api': apiTarget } }
});
