-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
45 lines (42 loc) · 1.07 KB
/
Copy pathvite.config.ts
File metadata and controls
45 lines (42 loc) · 1.07 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
import { defineConfig, lazyPlugins } from 'vite-plus'
import formatterConfig from './oxfmt.config'
import lintConfig from './oxlint.config'
// https://vitejs.dev/config/
export default defineConfig({
fmt: formatterConfig,
lint: lintConfig,
plugins: lazyPlugins(async () => {
const [
{ default: tailwindcss },
{ tanstackStart },
{ default: viteReact },
{ nitro },
] = await Promise.all([
import('@tailwindcss/vite'),
import('@tanstack/react-start/plugin/vite'),
import('@vitejs/plugin-react'),
import('nitro/vite'),
])
return [
tailwindcss(),
tanstackStart({
spa: {
enabled: true,
},
}),
nitro({
serverDir: 'server',
}),
viteReact({ compiler: true }),
]
}),
resolve: {
tsconfigPaths: true,
},
server: {
open: true,
},
staged: {
'*': 'vp check --fix',
},
})