Skip to content

Commit 06de70c

Browse files
committed
Fixed issues:
TanStack Router Dev Tools were appearing in production zod was not in the evalite-ui package.json
1 parent 5afde16 commit 06de70c

File tree

5 files changed

+56
-52
lines changed

5 files changed

+56
-52
lines changed

apps/evalite-ui/app/routes/__root.tsx

+22-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
import {
2-
createRootRouteWithContext,
3-
Link,
4-
Outlet,
5-
} from "@tanstack/react-router";
61
import {
72
type QueryClient,
8-
useSuspenseQueries,
93
queryOptions,
10-
useSuspenseQuery,
114
useQueryClient,
5+
useSuspenseQueries,
6+
useSuspenseQuery,
127
} from "@tanstack/react-query";
13-
import { TanStackRouterDevtools } from "@tanstack/router-devtools";
148
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
9+
import {
10+
createRootRouteWithContext,
11+
Link,
12+
Outlet,
13+
} from "@tanstack/react-router";
1514

16-
import { useSubscribeToSocket } from "~/data/use-subscribe-to-socket";
15+
import type { Db } from "@evalite/core/db";
16+
import { lazy } from "react";
17+
import Logo from "~/components/logo";
18+
import { getScoreState, Score, type ScoreState } from "~/components/score";
1719
import {
1820
Sidebar,
1921
SidebarContent,
@@ -24,15 +26,22 @@ import {
2426
SidebarMenuItem,
2527
SidebarProvider,
2628
} from "~/components/ui/sidebar";
27-
import { getScoreState, Score, type ScoreState } from "~/components/score";
28-
import "../tailwind.css";
29-
import Logo from "~/components/logo";
30-
import type { Db } from "@evalite/core/db";
3129
import {
3230
getMenuItemsQueryOptions,
3331
getServerStateQueryOptions,
3432
} from "~/data/queries";
33+
import { useSubscribeToSocket } from "~/data/use-subscribe-to-socket";
3534
import { useServerStateUtils } from "~/hooks/use-server-state-utils";
35+
import "../tailwind.css";
36+
37+
const TanStackRouterDevtools =
38+
process.env.NODE_ENV === "production"
39+
? () => null
40+
: lazy(() =>
41+
import("@tanstack/router-devtools").then((res) => ({
42+
default: res.TanStackRouterDevtools,
43+
}))
44+
);
3645

3746
const getMenuItemsWithSelect = queryOptions({
3847
...getMenuItemsQueryOptions,

apps/evalite-ui/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"react-markdown": "^9.0.1",
3838
"recharts": "^2.14.1",
3939
"tailwind-merge": "^2.5.5",
40-
"tailwindcss-animate": "^1.0.7"
40+
"tailwindcss-animate": "^1.0.7",
41+
"zod": "^3.23.8"
4142
},
4243
"devDependencies": {
4344
"@tailwindcss/typography": "^0.5.15",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"ci": "turbo build test lint after-build",
1616
"build": "turbo build after-build",
1717
"release": "pnpm run build && changeset publish",
18-
"test-example": "cd packages/example && evalite watch",
18+
"test-example": "cd packages/example && pnpm evalite watch",
1919
"prepare": "husky"
2020
},
2121
"keywords": [],

pnpm-lock.yaml

+30-36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"build": {
2525
"dependsOn": ["^build"],
26-
"outputs": ["dist", "*.tsbuildinfo", ".next", "build"],
26+
"outputs": ["dist", "*.tsbuildinfo", ".next"],
2727
"cache": true
2828
},
2929
"after-build": {

0 commit comments

Comments
 (0)