import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueDevTools from 'vite-plugin-vue-devtools' import VueI18nPlugin from '@intlify/unplugin-vue-i18n' import path from 'path' import tailwindcss from '@tailwindcss/vite' // https://vite.dev/config/ export default defineConfig({ plugins: [ VueI18nPlugin.vite({ include: [path.resolve(__dirname, './src/locales/**')], }), vue(), vueDevTools(), tailwindcss(), ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, server: { port: 5000, host: '0.0.0.0', allowedHosts: true, // The backend is reached through this proxy in development, so the frontend // and the api share the same origin (needed for the session cookie). proxy: { '/api': { target: 'http://localhost:3000/', }, }, cors: true, }, })