Wire OTP and cart/catalog to the API with Vite proxy, fix resend/register name persistence, harden order submit errors, and polish OTP and cart footer UI. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
650 B
TypeScript
32 lines
650 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
import UnoCSS from '@unocss/vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
vueJsx(),
|
|
UnoCSS(),
|
|
vueDevTools(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/server/api': {
|
|
target: 'https://parche.montech.ir',
|
|
changeOrigin: true,
|
|
secure: true,
|
|
},
|
|
},
|
|
},
|
|
})
|