-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathvite.config.ts
More file actions
46 lines (44 loc) · 1.11 KB
/
vite.config.ts
File metadata and controls
46 lines (44 loc) · 1.11 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
import tailwindcss from "@tailwindcss/vite";
import { tanstackRouter } from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react-swc";
import path from "node:path";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
const dagreCjsPath = path.resolve(
process.cwd(),
"node_modules/@dagrejs/dagre/dist/dagre.cjs.js",
);
// https://vitejs.dev/config/
export default defineConfig({
base: "",
build: {
manifest: true,
rollupOptions: {
input: "src/main.tsx",
output: {
manualChunks: {
// use vite-bundle-visualizer to find good candidates for manual chunks:
dagrejs: ["@dagrejs/dagre"],
headlessui: ["@headlessui/react"],
"react-dom": ["react-dom"],
reactflow: ["@xyflow/react"],
},
},
},
sourcemap: true,
target: "esnext",
},
plugins: [
tailwindcss(),
react(),
tanstackRouter({
routeFileIgnorePattern: ".(const|schema|test).(ts|tsx)",
}),
tsconfigPaths(),
],
resolve: {
alias: {
"@dagrejs/dagre": dagreCjsPath,
},
},
});