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.
This commit is contained in:
mantrakp04 2026-04-30 15:45:01 -07:00
parent 5a5e910ece
commit 87d8a2aaa7

View File

@ -1,7 +1,16 @@
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({}),
defineConfig({
resolve: {
alias: {
"@stackframe/tanstack-start/tanstack-start-server-context": tanstackStartServerContextStub, // THIS_LINE_PLATFORM template
},
},
}),
)