-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
54 lines (50 loc) · 1.36 KB
/
vite.config.ts
File metadata and controls
54 lines (50 loc) · 1.36 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
import tailwindcss from "@tailwindcss/vite";
import { devtools } from "@tanstack/devtools-vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import react from "@vitejs/plugin-react";
import mdx from "fumadocs-mdx/vite";
import { nitro } from "nitro/vite";
import { defineConfig } from "vite";
import tsConfigPaths from "vite-tsconfig-paths";
// import mkcert from "vite-plugin-mkcert";
import * as mdxConfig from "./source.config";
/**
* Vite configuration.
* @see https://vite.dev/config
*/
const viteConfig = defineConfig({
server: {
port: 3000,
host: "0.0.0.0",
},
ssr: {
noExternal: ["@omnidotdev/garden"],
// Native modules must be externalized for SSR
external: ["@resvg/resvg-js"],
},
optimizeDeps: {
include: ["@omnidotdev/garden", "@xyflow/react", "react", "react-dom"],
// Exclude native modules from optimization
exclude: ["@resvg/resvg-js"],
},
plugins: [
devtools(),
// TODO enable, dev breaks
// mkcert(),
mdx(mdxConfig),
tailwindcss(),
tsConfigPaths({
projects: ["./tsconfig.json"],
}),
tanstackStart({
prerender: {
// TODO enable, build breaks
// enabled: true,
},
}),
react(),
// see https://tanstack.com/start/latest/docs/framework/react/guide/hosting for hosting config
nitro(),
],
});
export default viteConfig;