Files
PIbd-21_Valiulov_I.A._IP/vite.config.js
IlyasValiulov 958a0a9fbb labwork04
2025-04-20 11:39:57 +04:00

25 lines
462 B
JavaScript

import { defineConfig } from 'vite';
import path from 'path';
export default defineConfig({
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, 'index.html'),
}
}
},
// server: {
// port: 3000,
// hot: true,
// },
server: {
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
},
}
});