-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.mts
38 lines (37 loc) · 1.08 KB
/
vite.config.mts
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
import { coverageConfigDefaults, defineConfig } from "vitest/config";
import solidPlugin from "vite-plugin-solid";
import inlinePlugin from "@molgenis/vite-plugin-inline";
export default defineConfig(({ command }) => ({
plugins: [solidPlugin(), inlinePlugin()],
esbuild: {
// @molgenis/vite-plugin-inline requires ascii input and cannot handle UTF-8 input
charset: "ascii",
pure: command === "build" ? ["console.log"] : [],
},
build: {
modulePreload: false,
reportCompressedSize: false,
// inline plugin build options
rollupOptions: {
input: ["./index.html", "./node_modules/@molgenis/vite-plugin-inline/dist/loader.mjs"],
output: {
manualChunks: undefined,
},
},
},
assetsInclude: "**/*.blob",
test: {
coverage: {
include: ["src/**"],
exclude: [...coverageConfigDefaults.exclude, "src/mocks/**"],
// TODO add .tsx once component tests are added
extension: [".ts"],
thresholds: {
branches: 80,
lines: 80,
functions: 80,
statements: 80,
},
},
},
}));