Skip to content

Commit c82e0f9

Browse files
thomasballingerConvex, Inc.
authored andcommitted
Detect TanStack Start in CLI (#30779)
TanStack Start recently dropped Vite as a dependency, causing Convex not to know to use VITE_CONVEX_URL. GitOrigin-RevId: ae515eeb56d6724a7af8e9f4fee5bc6df3718bc5
1 parent 536398b commit c82e0f9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/cli/lib/envvars.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const _FRAMEWORKS = [
1414
"Remix",
1515
"SvelteKit",
1616
"Expo",
17+
"TanStackStart",
1718
] as const;
1819
type Framework = (typeof _FRAMEWORKS)[number];
1920

@@ -144,6 +145,16 @@ export async function suggestedEnvVarName(ctx: Context): Promise<{
144145
};
145146
}
146147

148+
// TanStackStart currently supports VITE_FOO for browser-side envvars.
149+
const isTanStackStart = "@tanstack/start" in packages;
150+
151+
if (isTanStackStart) {
152+
return {
153+
detectedFramework: "TanStackStart",
154+
envVar: "VITE_CONVEX_URL",
155+
};
156+
}
157+
147158
return {
148159
envVar: "CONVEX_URL",
149160
};

0 commit comments

Comments
 (0)