refactor: convert to bun workspaces monorepo
- Move web app into apps/web/ - Create packages/shared/ with shared types - Create plugins/decky-vault/ scaffold - Root package.json manages workspaces only
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { treaty } from "@elysia/eden"
|
||||
import type { App } from "@/lib/api/app"
|
||||
|
||||
// Use require() on the server branch to prevent the client bundler from
|
||||
// pulling in Elysia and the route module. The typeof window check is the
|
||||
// standard Next.js server-vs-client guard.
|
||||
export const api =
|
||||
typeof window === "undefined"
|
||||
? // eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
treaty((require("@/lib/api/app") as { app: App }).app).api
|
||||
: treaty<App>(process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000").api
|
||||
Reference in New Issue
Block a user