generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
32 lines (31 loc) · 974 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
32
import { vitePlugin as remix } from "@remix-run/dev"
import react from "@vitejs/plugin-react"
import { defineConfig, loadEnv } from "vite"
import tsconfigPaths from "vite-tsconfig-paths"
export default defineConfig({
plugins: [
process.env.VITEST
? react()
: remix({
ssr: false,
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
}),
tsconfigPaths(),
],
test: {
globals: true,
environment: "happy-dom",
setupFiles: ["./vitest.setup.ts"],
env: loadEnv("test", process.cwd(), ""),
include: ["./app/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
exclude: [".*\\/node_modules\\/.*", ".*\\/build\\/.*", ".*\\/postgres-data\\/.*", ".*\\/public\\/.*"],
coverage: {
include: ["app/**"],
exclude: ["app/root.tsx", "app/entry.client.tsx", "app/entry.server.tsx", "app/routes/**"],
},
},
})