2026-10-02 19:51:13 +02:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import tailwindcss from '@tailwindcss/vite'
|
2026-10-04 17:18:48 +02:00
|
|
|
import { APP_VERSION } from '../shared/src/index.js'
|
2026-10-02 19:51:13 +02:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [tailwindcss()],
|
2026-10-04 17:18:48 +02:00
|
|
|
define: {
|
|
|
|
|
__APP_VERSION__: JSON.stringify(APP_VERSION),
|
|
|
|
|
},
|
2026-10-02 19:51:13 +02:00
|
|
|
server: {
|
|
|
|
|
port: 5173,
|
|
|
|
|
// Le cookie de session est same-origin : on proxifie l'API plutôt que
|
|
|
|
|
// d'activer CORS, sinon le cookie ne partirait pas en cross-origin.
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
|
|
|
|
target: 'http://localhost:8787',
|
|
|
|
|
changeOrigin: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
build: {
|
|
|
|
|
outDir: 'dist',
|
|
|
|
|
sourcemap: true,
|
|
|
|
|
},
|
|
|
|
|
})
|