Skip to content
Source
Sign inSign up
TanStack/schemas
Open History to see the last commit

vite.config.ts

26 lines797 Bytes

1import { defineConfig } from 'vite'
2import { devtools } from '@tanstack/devtools-vite'
3​
4import { tanstackStart } from '@tanstack/react-start/plugin/vite'
5​
6import viteReact from '@vitejs/plugin-react'
7import tailwindcss from '@tailwindcss/vite'
8import { cloudflare } from '@cloudflare/vite-plugin'
9​
10const config = defineConfig({
11 resolve: { tsconfigPaths: true },
12 plugins: [
13 devtools(),
14 // The Cloudflare plugin rejects vitest's resolve.external defaults, so it
15 // must be skipped under vitest (Workers-runtime tests need
16 // @cloudflare/vitest-pool-workers instead — see PLAN.md task 0.3).
17 ...(process.env.VITEST
18 ? []
19 : [cloudflare({ viteEnvironment: { name: 'ssr' } })]),
20 tailwindcss(),
21 tanstackStart(),
22 viteReact(),
23 ],
24})
25​
26export default config