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

vite.config.ts

29 lines661 Bytes

1import { defineConfig } from 'vite'
2import { tanstackStart } from '@tanstack/react-start/plugin/vite'
3import viteReact from '@vitejs/plugin-react'
4​
5const outDir = process.env.E2E_DIST_DIR ?? 'dist-vite-ssr'
6const transformInlineCssAssets =
7 process.env.CSS_INLINE_TRANSFORM_ASSETS === 'true'
8​
9export default defineConfig({
10 resolve: { tsconfigPaths: true },
11 build: {
12 outDir,
13 },
14 server: {
15 port: 3000,
16 },
17 plugins: [
18 tanstackStart({
19 server: {
20 build: {
21 inlineCss: transformInlineCssAssets
22 ? { enabled: true, transformAssets: true }
23 : true,
24 },
25 },
26 }),
27 viteReact(),
28 ],
29})