-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
62 lines (61 loc) · 1.54 KB
/
Copy pathvite.config.ts
File metadata and controls
62 lines (61 loc) · 1.54 KB
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
/// <reference types="vitest/config" />
import path from "pathe";
import tanstackRouter from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { ohImage } from "./src/plugin";
import tailwindcss from "@tailwindcss/vite";
import tsconfigPaths from "vite-tsconfig-paths";
import Inspect from "vite-plugin-inspect";
import { playwright } from "@vitest/browser-playwright";
export default defineConfig({
root: "./playground",
optimizeDeps: {
include: ["@cloudinary/url-gen"],
},
plugins: [
Inspect(),
ohImage({
breakpoints: [16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 1920],
placeholder: {
quality: 10,
blur: 100,
},
}),
tsconfigPaths(),
tailwindcss(),
tanstackRouter({
routesDirectory: path.resolve(__dirname, "./playground/src/routes"),
generatedRouteTree: path.resolve(
__dirname,
"./playground/src/routeTree.gen.ts",
),
}),
react(),
],
test: {
root: ".",
projects: [
{
test: {
include: ["tests/server/*.test.ts"],
environment: "node",
setupFiles: ["tests/server/setup.ts"],
},
},
{
test: {
include: ["tests/browser/**/*.test.{ts,tsx}"],
browser: {
enabled: true,
provider: playwright(),
instances: [{ browser: "chromium" }],
},
chaiConfig: {
truncateThreshold: 1000,
},
},
},
],
},
});