Open History to see the last commit
1import { defineConfig, mergeConfig } from 'vitest/config'
2import { tanstackViteConfig } from '@tanstack/config/vite'
3import packageJson from './package.json'
4// this needs to be imported from the actual file instead of from 'index.tsx'
5// so we don't trigger the import of a `?script-string` import before the minifyScriptPlugin is setup
6import { VIRTUAL_MODULES } from './src/virtual-modules'
7β
8const config = defineConfig({
9 test: {
10 include: ['**/*.{test-d,test,spec}.?(c|m)[jt]s?(x)'],
11 name: packageJson.name,
12 watch: false,
13 environment: 'jsdom',
14 },
15})
16β
17export default mergeConfig(
18 config,
19 tanstackViteConfig({
20 srcDir: './src',
21 entry: [
22 './src/index.tsx',
23 './src/createServerRpc.ts',
24 './src/createSsrRpc.ts',
25 './src/fake-start-server-fn-manifest.ts',
26 ],
27 externalDeps: [
28 ...Object.values(VIRTUAL_MODULES),
29 '#tanstack-start-entry',
30 '#tanstack-router-entry',
31 '#tanstack-start-server-fn-manifest',
32 ],
33 cjs: false,
34 }),
35)