Open History to see the last commit
1import { defineConfig, mergeConfig } from 'vitest/config'
2import { tanstackViteConfig } from '@tanstack/vite-config'
3import packageJson from './package.json'
4β
5export default defineConfig(({ command }) =>
6 mergeConfig(
7 {
8 define:
9 command === 'build'
10 ? {
11 'import.meta.hot': 'import.meta.hot',
12 }
13 : undefined,
14 test: {
15 typecheck: { enabled: true },
16 name: packageJson.name,
17 watch: false,
18 environment: 'jsdom',
19 },
20 },
21 tanstackViteConfig({
22 tsconfigPath: './tsconfig.build.json',
23 srcDir: './src',
24 entry: [
25 './src/index.tsx',
26 './src/client/index.ts',
27 './src/client-rpc/index.ts',
28 './src/hydration/constants.ts',
29 './src/hydration.ts',
30 './src/hydration/runtime.ts',
31 './src/fake-entries/start.ts',
32 './src/fake-entries/router.ts',
33 './src/empty-plugin-adapters.ts',
34 ],
35 cjs: false,
36 externalDeps: [
37 '#tanstack-start-entry',
38 '#tanstack-router-entry',
39 '#tanstack-start-plugin-adapters',
40 ],
41 }),
42 ),
43)