forked from SpaceyaTech/CoLabs-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
34 lines (34 loc) · 908 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
33
34
/// <reference types="vitest" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import tsconfigPaths from "vite-tsconfig-paths";
import analyze from "rollup-plugin-analyzer";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
TanStackRouterVite({
routeToken: "layout", // <-- Add this line
autoCodeSplitting: true,
}),
react(),
tsconfigPaths(),
analyze({
// highlight the modules with size > 40kb
filter(moduleObject) {
return moduleObject.size > 40000;
},
}),
],
server: {
port: 3000,
host: true,
},
test: {
globals: true,
environment: "jsdom",
include: ["./src/**/*.{test,spec}.?(c|m)[jt]s?(x)"],
exclude: ["e2e-tests", "node_modules"],
setupFiles: "./src/lib/vitest/setup.ts",
},
});