Skip to content

VexConfigInput

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

User-facing configuration input passed to defineConfig().

All properties are optional — omitting collections produces an empty CMS with no custom content types registered.

Defaults applied by defineConfig():

{
collections: [], // no collections registered — the CMS starts empty
}
// Register a collection
defineConfig({
collections: [
defineCollection({ slug: "posts", fields: { title: text() } }),
],
});
// Register collections and customise the admin panel
defineConfig({
admin: { sidebar: { side: "right" } },
collections: [posts, authors],
});

optional access?: VexAccessConfig<Record<string, SubjectEntry>, readonly AccessResource[], string, string | undefined, Partial<Record<string, CustomActionsInput>>>

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


optional admin?: AdminConfigInput

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

Admin panel configuration. All properties are optional — omitted values fall back to defaults.

Defaults applied by defineConfig():

{ sidebar: { side: "left" } }

AdminConfigInput for all available options


optional authAdapter?: VexAuthAdapter

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

Auth adapter to register authentication collections (user, session, account, verification, etc.) alongside user-defined collections.

Pass the return value of an auth adapter (e.g. better-auth/src!betterAuthAdapter from @vexcms/better-auth). Auth collections are merged with user collections by defineConfig() — protected auth collections cannot be overridden, and locked fields are preserved.


optional basePath?: string

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

URL prefix for all admin panel routes.

Default: "/admin". Override when mounting the admin UI at a custom path (e.g. "/cms" or "/dashboard/admin").


optional collections?: CollectionConfig<{ }, { }, string, string, ComponentHKT>[]

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

Content collections to register with the CMS. Defaults to [] if omitted.


optional globals?: GlobalConfig<{ }, { }, string, string, ComponentHKT>[]

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

Singleton global documents. Each produced by defineGlobal(). Slugs must be unique.


optional schema?: SchemaConfigInput

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

Schema generation configuration — controls output paths and auto-migration. All properties are optional; omitted values fall back to defaults.

SchemaConfigInput for all available options


optional storage?: object

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

Storage configuration — adapters and client-side upload functions.

When present, media collections are available in the admin panel and upload() fields can be used in regular collections. The adapters array holds the server-side adapter instances (stripped by sanitizeConfigForClient). The clientUploads map holds serializable uploadFile functions that the admin panel uses to upload files directly from the browser. Keys are StorageAdapterSlug — only presigned-url adapters registered in the config are valid.

adapters: StorageAdapterPresignedUrlInterface[]

Storage adapters configured for the project.


optional types?: TypesConfigInput

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