Files
SadmMontime/vite.config.ts
T
2026-05-21 17:59:14 +03:30

31 lines
640 B
TypeScript

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