From 87d8a2aaa7de480389e1182e39b6092e2fe75c8e Mon Sep 17 00:00:00 2001 From: mantrakp04 Date: Thu, 30 Apr 2026 15:45:01 -0700 Subject: [PATCH] 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. --- packages/template/vitest.config.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/template/vitest.config.ts b/packages/template/vitest.config.ts index e4c46fede..890a9e5c0 100644 --- a/packages/template/vitest.config.ts +++ b/packages/template/vitest.config.ts @@ -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 + }, + }, + }), )