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

vite.config.ts

32 lines835 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 { fileURLToPath, URL } from 'url'
7​
8import tailwindcss from '@tailwindcss/vite'
9import { cloudflare } from '@cloudflare/vite-plugin'
10​
11const config = defineConfig({
12 resolve: {
13 alias: {
14 '@': fileURLToPath(new URL('./src', import.meta.url)),
15 },
16 },
17 plugins: [
18 devtools(),
19 cloudflare({ viteEnvironment: { name: 'ssr' } }),
20 // this is the plugin that enables path aliases
21 viteTsConfigPaths({
22 projects: ['./tsconfig.json'],
23 }),
24 tailwindcss(),
25 tanstackStart(),
26 viteReact({
27 babel: {},
28 }),
29 ],
30})
31​
32export default config