add tanstack start

This commit is contained in:
Aman Varshney
2025-04-06 18:07:40 +05:30
parent 702eb2ecb5
commit d943bf0d80
44 changed files with 1559 additions and 70 deletions

View File

@@ -9,7 +9,7 @@ export async function getAddonsChoice(
): Promise<ProjectAddons[]> {
if (Addons !== undefined) return Addons;
const hasWeb =
const hasCompatibleWebFrontend =
frontends?.includes("react-router") ||
frontends?.includes("tanstack-router");
@@ -39,10 +39,13 @@ export async function getAddonsChoice(
},
];
const options = hasWeb ? [...webAddonOptions, ...addonOptions] : addonOptions;
const options = hasCompatibleWebFrontend
? [...webAddonOptions, ...addonOptions]
: addonOptions;
const initialValues = DEFAULT_CONFIG.addons.filter(
(addon) => hasWeb || (addon !== "pwa" && addon !== "tauri"),
(addon) =>
hasCompatibleWebFrontend || (addon !== "pwa" && addon !== "tauri"),
);
const response = await multiselect<ProjectAddons>({

View File

@@ -20,7 +20,8 @@ export async function getExamplesChoice(
const hasWebFrontend =
frontends?.includes("react-router") ||
frontends?.includes("tanstack-router");
frontends?.includes("tanstack-router") ||
frontends?.includes("tanstack-start");
if (!hasWebFrontend) return [];

View File

@@ -23,7 +23,10 @@ export async function getFrontendChoice(
},
],
initialValues: DEFAULT_CONFIG.frontend.some(
(f) => f === "tanstack-router" || f === "react-router",
(f) =>
f === "tanstack-router" ||
f === "react-router" ||
f === "tanstack-start",
)
? ["web"]
: [],
@@ -50,10 +53,18 @@ export async function getFrontendChoice(
label: "React Router",
hint: "A userobsessed, standardsfocused, multistrategy router you can deploy anywhere.",
},
{
value: "tanstack-start",
label: "TanStack Start (beta)",
hint: "SSR, Streaming, Server Functions, API Routes, bundling and more powered by TanStack Router and Vite.",
},
],
initialValue:
DEFAULT_CONFIG.frontend.find(
(f) => f === "tanstack-router" || f === "react-router",
(f) =>
f === "tanstack-router" ||
f === "react-router" ||
f === "tanstack-start",
) || "tanstack-router",
});