import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import tailwindcss from '@tailwindcss/vite'
import Icons from 'unplugin-icons/vite'

export default defineConfig({
  base: '/admin',
  plugins: [vue(), tailwindcss(), Icons({ compiler: 'vue3' })],
  resolve: {
    alias: { '@': resolve(__dirname, 'src') },
  },
  server: {
    port: 3000,
    // proxy: {
    //   '/v1': { target: "http://localhost:28175", rewrite: (path) => path.replace(/^\/v1/, "/api/v1"), changeOrigin: true },
    // },
  },
})
