Skip to content

Commit 553ae99

Browse files
committed
fix(table): import TABLE_LIMITS from constants to keep server code out of client bundle
The client hook `use-table-data.ts` was importing `TABLE_LIMITS` as a value from the `@/lib/table` barrel, which transitively pulls in `service.ts` and the `postgres` driver. Turbopack then tried to bundle `fs`, `net`, `tls`, and `perf_hooks` into the client component graph and the production build failed. Import `TABLE_LIMITS` directly from `@/lib/table/constants` (a pure constants module) and keep the type imports against the barrel.
1 parent 75d2f29 commit 553ae99

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table-data.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useCallback, useMemo } from 'react'
2-
import { TABLE_LIMITS, type TableDefinition, type TableRow } from '@/lib/table'
2+
import type { TableDefinition, TableRow } from '@/lib/table'
3+
import { TABLE_LIMITS } from '@/lib/table/constants'
34
import { useInfiniteTableRows, useTable } from '@/hooks/queries/tables'
45
import type { QueryOptions } from '../types'
56

0 commit comments

Comments
 (0)