Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: Update dev script port to 3004 for `ui-library` (#43555)

Ivan Vasilovb4b453206522
diff --git a/apps/ui-library/components/tanstack-db-generator/index.tsx b/apps/ui-library/components/tanstack-db-generator/index.tsx
index 586cfd06576..988d3343352 100644
--- a/apps/ui-library/components/tanstack-db-generator/index.tsx
+++ b/apps/ui-library/components/tanstack-db-generator/index.tsx
@@ -50,7 +50,7 @@ export function TanstackDBGenerator() {
const baseUrl = getBaseUrl()
const apiUrl = resolvedProject
- ? `${baseUrl}${process.env.NEXT_PUBLIC_BASE_PATH ?? ''}/api/registry/tanstack-db?ref=${encodeURIComponent(resolvedProject.projectRef)}&anonKey=${encodeURIComponent(resolvedProject.anonKey)}`
+ ? `${baseUrl}/api/registry/tanstack-db?ref=${encodeURIComponent(resolvedProject.projectRef)}&anonKey=${encodeURIComponent(resolvedProject.anonKey)}`
: ''
const commands: Record<PackageManager, string> = {
diff --git a/apps/ui-library/next.config.mjs b/apps/ui-library/next.config.mjs
index 44a9a34c9ec..412f0de78b4 100644
--- a/apps/ui-library/next.config.mjs
+++ b/apps/ui-library/next.config.mjs
@@ -16,6 +16,12 @@ const nextConfig = {
},
]
: []),
+ // Add a redirect to make the custom block for tanstack-db
+ {
+ source: '/r/tanstack-db-nextjs.json',
+ destination: '/api/registry/tanstack-db',
+ permanent: true,
+ },
]
},
eslint: {
diff --git a/apps/ui-library/package.json b/apps/ui-library/package.json
index 2ed3dac2c1c..544f1a5fd3f 100644
--- a/apps/ui-library/package.json
+++ b/apps/ui-library/package.json
@@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"preinstall": "npx only-allow pnpm",
- "dev": "next dev --port 8082",
+ "dev": "next dev --port 3004",
"build": "pnpm run content:build && pnpm run build:registry && pnpm run build:llms && next build --turbopack",
"build:registry": "rimraf -G public/r/* && tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-registry.mts && shadcn build public/r/registry.json && tsx scripts/clean-registry.ts",
"build:llms": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-llms-txt.ts",