Files
webMontime/vite.config.ts
T

31 lines
640 B
TypeScript
Raw Normal View History

2026-05-18 16:02:43 +03:30
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { fileURLToPath, URL } from 'node:url';
const API_TARGET = 'https://api.montime.ir';
2026-05-18 21:30:37 +03:30
export default defineConfig({
plugins: [vue()],
2026-05-18 16:02:43 +03:30
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
2026-05-18 21:30:37 +03:30
port: 5173,
proxy: {
'/api': {
target: API_TARGET,
changeOrigin: true,
secure: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
'/uploads': {
target: API_TARGET,
changeOrigin: true,
secure: true,
},
},
2026-05-18 16:02:43 +03:30
},
2026-05-18 21:30:37 +03:30
});