BillTracker/vite.config.js

24 lines
521 B
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [react()],
resolve: {
alias: { '@': path.resolve(__dirname, './client') },
},
server: {
port: 5173,
proxy: {
'/api': { target: 'http://localhost:3000', changeOrigin: true },
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
},
});