Skip to content

Commit 248dcd3

Browse files
committed
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.
1 parent a79dea2 commit 248dcd3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

packages/template/vitest.config.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
import { fileURLToPath } from 'node:url' // THIS_LINE_PLATFORM template
12
import { defineConfig, mergeConfig } from 'vitest/config'
23
import sharedConfig from '../../vitest.shared'
34

5+
const tanstackStartServerContextStub = fileURLToPath(new URL('./src/tanstack-start-server-context.default.ts', import.meta.url)) // THIS_LINE_PLATFORM template
6+
47
export default mergeConfig(
58
sharedConfig,
6-
defineConfig({}),
9+
defineConfig({
10+
resolve: {
11+
alias: {
12+
"@stackframe/tanstack-start/tanstack-start-server-context": tanstackStartServerContextStub, // THIS_LINE_PLATFORM template
13+
},
14+
},
15+
}),
716
)

0 commit comments

Comments
 (0)