forked from actions-rs/clippy-check
-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.ts
42 lines (39 loc) · 1.31 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
import { codecovVitePlugin } from "@codecov/vite-plugin";
import type { UserConfig } from "vite";
import viteTsConfigPaths from "vite-tsconfig-paths";
import { coverageConfigDefaults, defineConfig } from "vitest/config";
const deps: string[] = ["@actions-rs-plus/core"];
// https://vitejs.dev/config/
export default defineConfig(() => {
const config: UserConfig = {
appType: "custom",
plugins: [
viteTsConfigPaths(),
codecovVitePlugin({
enableBundleAnalysis: process.env["CODECOV_TOKEN"] !== undefined,
bundleName: "library",
uploadToken: process.env["CODECOV_TOKEN"] ?? "",
}),
],
test: {
coverage: {
exclude: [...coverageConfigDefaults.exclude, "./dependency-cruiser.config.mjs"],
reporter: ["json", "html", "text"],
reportsDirectory: "coverage",
},
environment: "node",
environmentOptions: {},
outputFile: {
junit: "./reports/test-report.xml",
},
server: {
deps: {
inline: deps,
},
},
restoreMocks: true,
setupFiles: ["./test.setup.ts"],
},
};
return config;
});