33 lines
710 B
JavaScript
33 lines
710 B
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
|
|
server: {
|
|
proxy: {
|
|
'/api': 'http://localhost:5000',
|
|
},
|
|
},
|
|
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: './src/setupTests.js',
|
|
|
|
// Jenkins pourra lire directement ce fichier.
|
|
reporters: ['default', 'junit'],
|
|
outputFile: {
|
|
junit: './test-results/junit.xml',
|
|
},
|
|
|
|
// Rapports utilisés ensuite par Jenkins et SonarQube.
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html', 'lcov'],
|
|
reportsDirectory: './coverage',
|
|
},
|
|
},
|
|
})
|