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

vite.config.ts

24 lines746 Bytes

1import { defineConfig } from 'vite'
2import { devtools } from '@tanstack/devtools-vite'
3import { tanstackStart } from '@tanstack/react-start/plugin/vite'
4import viteReact from '@vitejs/plugin-react'
5import viteTsConfigPaths from 'vite-tsconfig-paths'
6import { cloudflare } from '@cloudflare/vite-plugin'
7​
8const config = defineConfig({
9 plugins: [
10 devtools({
11 consolePiping: {},
12 }),
13 // Cloudflare Workers run server code in an isolated environment.
14 // This is another runtime where globalThis is not shared with the Vite main thread.
15 cloudflare({ viteEnvironment: { name: 'ssr' } }),
16 viteTsConfigPaths({
17 projects: ['./tsconfig.json'],
18 }),
19 tanstackStart(),
20 viteReact(),
21 ],
22})
23​
24export default config