meteo-exam/web/vite.config.ts

22 lines
496 B
TypeScript
Raw Normal View History

import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [tailwindcss()],
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,
},
})