-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathvite.config.ts
More file actions
55 lines (48 loc) · 1.25 KB
/
Copy pathvite.config.ts
File metadata and controls
55 lines (48 loc) · 1.25 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
import { nitro } from "nitro/vite";
import path from "path";
import AutoImport from "unplugin-auto-import/vite";
import { defineConfig } from "vite";
// vite plugins
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react-swc";
import Fonts from "unplugin-fonts/vite";
import Inspect from "vite-plugin-inspect";
import Pages from "vite-plugin-pages";
import svgr from "vite-plugin-svgr";
import { fonts } from "./configs/fonts.config";
export default defineConfig({
server: {
host: "0.0.0.0",
port: 5000,
},
plugins: [
nitro(),
react(),
Pages({
dirs: "src/pages",
extensions: ["tsx", "jsx"],
importMode: "sync",
}),
svgr(),
Inspect(),
// ViteImagemin() - commented out due to type issues, uncomment if needed
tailwindcss(),
Fonts({ google: { families: fonts } }),
AutoImport({
imports: ["react", "react-router"],
dts: "./auto-imports.d.ts",
eslintrc: {
enabled: true,
// filepath: "./eslint.config.js",
},
viteOptimizeDeps: true,
// uncomment if you want to auto import ui components
// dirs: ['./src/components/ui'],
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});