-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
36 lines (34 loc) · 974 Bytes
/
vite.config.ts
File metadata and controls
36 lines (34 loc) · 974 Bytes
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
import { defineConfig } from "vite";
import viteReact from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import { resolve } from "node:path";
// https://vitejs.dev/config/
export default defineConfig({
// Use DOCS_VIEWER_DIR if available, otherwise current directory
root: process.env.DOCS_VIEWER_DIR || process.cwd(),
plugins: [TanStackRouterVite({ autoCodeSplitting: true }), viteReact(), tailwindcss()],
resolve: {
alias: {
"@": resolve(process.env.DOCS_VIEWER_DIR || process.cwd(), "./"),
},
},
// Add node-specific configuration for fs and path
optimizeDeps: {
esbuildOptions: {
define: {
global: "globalThis",
},
},
exclude: ["content"],
},
server: {
fs: {
strict: false,
},
},
// Keeping the default build configuration
build: {
assetsInlineLimit: 4096, // Default inline limit
},
});