import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from '@vant/auto-import-resolver';
import { resolve } from 'path';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
  return {
    base: '/home',
    server: {
      host: '0.0.0.0',
      port: 5173,
    },
    plugins: [
      vue(),
      Components({
        resolvers: [
          VantResolver(),
        ],
      })
    ],
    resolve: {
      alias: {
        '@': resolve(__dirname, 'src')
      }
    },
  }
})
