import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': resolve(__dirname, 'src'), }, }, server: { port: 5173, // Proxy vers le backend Go en développement proxy: { '/api': { target: 'http://localhost:3001', changeOrigin: true, }, '/ws': { target: 'ws://localhost:3001', ws: true, changeOrigin: true, }, }, }, build: { outDir: 'dist', sourcemap: false, // Optimiser les chunks pour de meilleures performances rollupOptions: { output: { manualChunks: { 'vue-core': ['vue', 'vue-router', 'pinia'], 'i18n': ['vue-i18n'], 'terminal': ['@xterm/xterm', '@xterm/addon-fit', '@xterm/addon-attach'], 'editor': [ '@codemirror/state', '@codemirror/view', '@codemirror/commands', '@codemirror/language', ], }, }, }, }, })