-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
31 lines (27 loc) · 925 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import path from "path";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import svgr, { VitePluginSvgrOptions } from "vite-plugin-svgr";
import { configDefaults } from "vitest/config";
import { coverageV8Options } from "./tests/config";
const svgrOptions: VitePluginSvgrOptions["svgrOptions"] = {
exportType: "default",
ref: true,
svgo: false,
titleProp: true,
};
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), svgr({ svgrOptions, include: "**/*.svg" })],
envDir: "./env",
test: {
globals: true,
environment: "jsdom",
setupFiles: "./tests/setup.ts",
reporters: ["verbose", "json"],
outputFile: "./tests/reports/results.json",
exclude: [...configDefaults.exclude, "./firebase", "./config"],
coverage: { provider: "v8", ...coverageV8Options },
},
resolve: { alias: { "@": path.resolve(__dirname, "./src") } },
});