mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add tanstack start
This commit is contained in:
@@ -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>({
|
||||
|
||||
@@ -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 [];
|
||||
|
||||
|
||||
@@ -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 user‑obsessed, standards‑focused, multi‑strategy 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",
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user