Files
akvorado/console/frontend/vite.config.ts
Vincent Bernat ab0bd17748 console/frontend: don't do a full coverage for JS
Only compute coverage when there are tests. I don't have the resources
to do a full coverage for JS.
2024-02-05 22:34:00 +01:00

46 lines
1.1 KiB
TypeScript

// SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { lezer } from "@lezer/generator/rollup";
import { fileURLToPath, URL } from "node:url";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), lezer()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
build: {
outDir: "../data/frontend",
emptyOutDir: true,
chunkSizeWarningLimit: 2000,
},
test: {
reporters: ["default", "junit"],
outputFile: "../../test/js/tests.xml",
coverage: {
reporter: ["text-summary", "html", "cobertura"],
reportsDirectory: "../../test/js",
all: false,
},
},
server: {
proxy: {
"/api": {
target: "http://127.0.0.1:8080",
changeOrigin: true,
headers: {
"Remote-User": "alfred",
"Remote-Name": "Alfred Pennyworth",
"Remote-Email": "alfred@dccomics.example.com",
"X-Logout-URL": "https://en.wikipedia.org/wiki/Alfred_Pennyworth",
},
},
},
},
});