Skip to content
Source
Sign inSign up
TanStack/cli

fix(create): use type-only import for Convex Id in React demo template #378

Mergedfelipedresch(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/378/headmerged by tannerlinsley

Summary

  • Changes React Convex demo template to import Id as type-only.
  • Aligns React template with Solid Convex template behavior.
  • Prevents module resolution/build issues where dataModel is type-only (.d.ts).

Change

In: packages/create/src/frameworks/react/add-ons/convex/assets/src/routes/demo/convex.tsx

From:

import { Id } from '../../../convex/_generated/dataModel'

To:

import type { Id } from '../../../convex/_generated/dataModel'

Why

Id is only used as a type and should not be emitted as runtime import.

Test plan

  • Generate app with Convex add-on using create flow
  • Run npx convex dev
  • Run npm run dev / npm run build
  • Confirm no resolution error for convex/_generated/dataModel

Fixes issue #377

    1. tannerlinsley merged thisd3fffed

    2. tannerlinsley closed this

Sign in to join this conversation.