import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import UnoCSS from 'unocss/vite'
import { resolve } from 'path';

export default defineConfig({
  plugins: [
    uni(),
    UnoCSS()
  ],
  resolve: {
    alias: {
      '@': resolve(__dirname, './src'),
    },
  },
  server: {
    proxy: {
      '/api-base': {
        target: 'http://store-manage.hmily.club',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api-base/, '/api'),
      },
    }
  }
})
