convex/convex.config.ts, which is one of the files in the convex/ directory that Confect does not manage. Configure components using the vanilla Convex API.
convex/convex.config.ts
Referencing components
Component clients (likeWorkpool) take a component reference. Import the typed components registry that Confect generates at confect/_generated/components.ts:
confect/workpool.ts
Use this registry rather than the
components export of
convex/_generated/api, which doesn’t exist yet when confect codegen
evaluates your code and so breaks codegen on a clean checkout. Confect’s
registry is equivalent, but is derived directly from
convex/convex.config.ts, so it is safe to import anywhere in your confect/
directory.Each component is typed with the
ComponentApi type that component packages
export from _generated/component.js. Recently published versions of the
official @convex-dev/* components all follow this convention; a component
that predates it will still work at runtime but won’t get precise types.