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

vite.config.ts

32 lines829 Bytes

1import { fileURLToPath } from 'node:url'
2import { defineConfig } from 'vitest/config'
3import codspeedPlugin from '@codspeed/vitest-plugin'
4import { tanstackStart } from '@tanstack/react-start/plugin/vite'
5import react from '@vitejs/plugin-react'
6import { cpuSimulationExecArgv } from '../../cpu-simulation'
7​
8const rootDir = fileURLToPath(new URL('.', import.meta.url))
9​
10export default defineConfig({
11 root: rootDir,
12 plugins: [
13 !!(process.env.VITEST && process.env.WITH_INSTRUMENTATION) &&
14 codspeedPlugin(),
15 tanstackStart({
16 srcDirectory: 'src',
17 }),
18 react(),
19 ],
20 build: {
21 outDir: './dist',
22 emptyOutDir: true,
23 minify: false,
24 },
25 test: {
26 execArgv: cpuSimulationExecArgv(),
27 isolate: true,
28 name: '@benchmarks/ssr (react)',
29 watch: false,
30 environment: 'node',
31 },
32})