-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathvite.config.ts
68 lines (65 loc) · 1.9 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import {vitePlugin as remix} from "@remix-run/dev"
import {installGlobals} from "@remix-run/node"
import tailwind from "@tailwindcss/vite"
import {vercelPreset} from "@vercel/remix/vite"
import react from "@vitejs/plugin-react"
import {remixDevTools} from "remix-development-tools"
import {defineConfig} from "vite"
import json5 from "vite-plugin-json5"
import {Mode, plugin as markdown} from "vite-plugin-markdown"
import tsconfigPaths from "vite-tsconfig-paths"
installGlobals()
declare module "@remix-run/node" {
interface Future {
v3_singleFetch: true
}
}
export default defineConfig({
plugins: [
tsconfigPaths(),
tailwind(),
json5(),
markdown({mode: [Mode.MARKDOWN]}),
remixDevTools({
client: {
showBreakpointIndicator: false,
},
}),
process.env.VITEST
? react()
: remix({
appDirectory: "src",
ignoredRouteFiles: ["**/.*"],
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_lazyRouteDiscovery: true,
v3_singleFetch: true,
v3_routeConfig: true,
},
presets: [vercelPreset()],
serverModuleFormat: "esm",
}),
],
server: {
open: true,
port: 3000,
},
test: {
clearMocks: true,
coverage: {
all: false,
clean: true,
cleanOnRerun: true,
enabled: true,
provider: "v8",
reporter: ["text", "lcov"],
reportOnFailure: false,
},
environment: "jsdom",
globals: false,
passWithNoTests: true,
setupFiles: ["src/test-utils/setup.tsx"],
},
})