Skip to content

Commit 8a194a6

Browse files
committed
fix(cli): add customViteReactPlugin flag to TanStack Start configurations
1 parent cef5840 commit 8a194a6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/cli/src/helpers/setup/workers-tanstack-start-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function setupTanstackStartWorkersDeploy(
6161
.getElements()
6262
.findIndex((el) => el.getText().includes("tanstackStart("));
6363

64-
const tanstackPluginText = 'tanstackStart({ target: "cloudflare-module" })';
64+
const tanstackPluginText = 'tanstackStart({ target: "cloudflare-module", customViteReactPlugin: true })';
6565

6666
if (tanstackPluginIndex === -1) {
6767
pluginsArray.addElement(tanstackPluginText);

apps/cli/templates/frontend/react/tanstack-start/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { defineConfig } from "vite";
22
import tsconfigPaths from "vite-tsconfig-paths";
33
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
44
import tailwindcss from "@tailwindcss/vite";
5+
import viteReact from "@vitejs/plugin-react";
56

67
export default defineConfig({
7-
plugins: [tsconfigPaths(), tailwindcss(), tanstackStart({})],
8+
plugins: [tsconfigPaths(), tailwindcss(), tanstackStart({ customViteReactPlugin: true }), viteReact()],
89
});

0 commit comments

Comments
 (0)