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

vite.config.ts

36 lines798 Bytes

1import { defineConfig } from 'vite'
2import { tanstackStart } from '@tanstack/react-start/plugin/vite'
3import { nitro } from 'nitro/vite'
4import viteReact from '@vitejs/plugin-react'
5import tailwindcss from '@tailwindcss/vite'
6import { devtools } from '@tanstack/devtools-vite'
7import { websocketRpcPlugin } from './chat-server/vite-plugin.js'
8​
9export default defineConfig({
10 plugins: [
11 websocketRpcPlugin(),
12 devtools(),
13 tailwindcss(),
14 tanstackStart(),
15 nitro(),
16 viteReact(),
17 ],
18 resolve: {
19 dedupe: ['capnweb'],
20 tsconfigPaths: true,
21 },
22 server: {
23 port: 3000,
24 host: true,
25 },
26 build: {
27 target: 'es2022',
28 },
29 optimizeDeps: {
30 exclude: ['capnweb'],
31 },
32 ssr: {
33 noExternal: ['@tanstack/ai', '@tanstack/ai-anthropic'],
34 },
35 nitro: {},
36})