Package Exports
Reference for supported import paths, Nuxt aliases, and auto-import boundaries.
Published entries
| Import | Purpose |
|---|---|
better-convex-nuxt | Nuxt module and stable root types |
better-convex-nuxt/auth-client | Framework-free auth-client definition and types |
better-convex-nuxt/errors | Framework-free call error contract |
better-convex-nuxt/server | Server caller and token-exchange boundaries |
better-convex-nuxt/server/createUserSyncTriggers | Convex-side user projection helper |
Do not deep-import dist, src/runtime, build-directory files, or unlisted subpaths.
Nuxt aliases
| Alias | Target |
|---|---|
#convex/api | Consumer convex/_generated/api |
#convex/server | Published Better Convex Nuxt server surface |
Use #convex/api in components, composables, middleware, and Nitro handlers. Convex code under convex/ uses its relative generated imports instead.
Auto-imports
The module auto-imports documented composables and optimistic helpers into Nuxt application code. It auto-imports serverConvex and exchangeConvexToken into Nitro server code.
Four auth components are registered globally.
Root types
The root exports stable types for module options, auth status/options, runtime configuration, client handle, server options, error kind, and primary composable options.
Runtime values other than the default Nuxt module live in their dedicated entries or Nuxt auto-import surface.
Missing generated API
Before Convex codegen creates convex/_generated/api, #convex/api points to a diagnostic placeholder. Accessing a function produces a codegen-oriented error instead of an untyped fallback.
See the generated API surface for the exact current inventory.