import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
import dotenv from 'dotenv';
import VueI18n from '@intlify/unplugin-vue-i18n/vite';

// 加载环境变量
dotenv.config();
interface ImportMetaEnv {
    readonly VITE_API_URL: string; // 示例环境变量
}

interface ImportMeta {
    readonly env: ImportMetaEnv;
}
export default defineConfig({
    plugins: [
        vue(),
        VueI18n({
            include: path.resolve(__dirname, './src/locales/**'),
        }),
    ],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, './src'),
        },
    },
    optimizeDeps: {
        include: ['quill'],
    },
    define: {
        //__API_URL__: JSON.stringify(process.env.VITE_API_URL),
    },
    
});
