Skip to content

VexServerConfigInput

Defined in: packages/core/src/config/types.ts:463

Server-only configuration input passed to defineServerConfig(), layered on top of an already-resolved VexClientConfig.

A field appears in this interface only if placing it on the client config would break the client bundle: auth.adapter and storage.adapters are the only two.

optional auth?: object

Defined in: packages/core/src/config/types.ts:473

Auth configuration — mirrors the storage group’s shape: the adapter instance under .adapter. The group is optional, but adapter is required WITHIN it: server.auth present guarantees an adapter, so no consumer needs a nested existence check.

Omit the whole group for a project with no auth, or one that does not want its client-declared authCollections verified.

adapter: VexAuthAdapter

Live auth adapter, constructed from the real server-side auth options (e.g. better-auth/src!betterAuthAdapter from @vexcms/better-auth).

Its collections are the source of truth: defineServerConfig() compares them against the authCollections the client config declared and throws when the two disagree, which is the only place that check can run — the browser cannot evaluate these options.


optional storage?: object

Defined in: packages/core/src/config/types.ts:503

Storage configuration — server-side adapter instances only. Media collections themselves are declared on the client config; adapters here are consulted only to confirm every mediaCollection.meta.storageAdapter resolves to a registered instance.

clientUploads is deliberately NOT accepted here. VexConfigProvider mounts the CLIENT config, so an upload function supplied only on the server config would exist server-side and never reach the browser — the admin upload UI would silently have no uploader. The type forbids the mistake instead of letting it fail at runtime.

adapters: StorageAdapterPresignedUrlInterface[]

Storage adapters configured for the project.

VexStorageAdapter for the adapter interface