stack/packages/template/vitest.config.ts
mantrakp04 87d8a2aaa7 Enhance Vite configuration for TanStack Start integration
- Updated vitest.config.ts to include a new alias for the TanStack Start server context, improving path resolution.
- Introduced a stub for the TanStack Start server context to streamline server context handling.

These changes enhance the integration of TanStack Start by improving the Vite configuration and server context management.
2026-04-30 15:45:01 -07:00

17 lines
585 B
TypeScript

import { fileURLToPath } from 'node:url' // THIS_LINE_PLATFORM template
import { defineConfig, mergeConfig } from 'vitest/config'
import sharedConfig from '../../vitest.shared'
const tanstackStartServerContextStub = fileURLToPath(new URL('./src/tanstack-start-server-context.default.ts', import.meta.url)) // THIS_LINE_PLATFORM template
export default mergeConfig(
sharedConfig,
defineConfig({
resolve: {
alias: {
"@stackframe/tanstack-start/tanstack-start-server-context": tanstackStartServerContextStub, // THIS_LINE_PLATFORM template
},
},
}),
)