Skip to main content

VendureDashboardPlugin

This is the Vite plugin which powers the Vendure Dashboard, including:

  • Configuring routing, styling and React support
  • Analyzing your VendureConfig file and introspecting your schema
  • Loading your custom Dashboard extensions
Signature

Parameters

options

Options for the vendureDashboardPlugin Vite plugin.

Signature

The PathAdapter interface allows customization of how paths are handled when compiling the Vendure config and its imports.

It enables support for more complex repository structures, such as monorepos, where the Vendure server configuration file may not be located in the root directory of the project.

If you get compilation errors like "Error loading Vendure config: Cannot find module", you probably need to provide a custom pathAdapter to resolve the paths correctly.

This can take some trial-and-error. Try logging values from the functions to figure out the exact settings that you need for your repo setup.

Example

Ts
Signature

getCompiledConfigPath

propertyGetCompiledConfigPathFn

A function to determine the path to the compiled Vendure config file.

transformTsConfigPathMappings

propertyTransformTsConfigPathMappingsFn

Options used by the vendureDashboardPlugin to configure how the Dashboard connects to the Vendure Admin API

Signature

host

propertystring | 'auto'
Default:'auto'

The hostname of the Vendure server which the admin UI will be making API calls to. If set to "auto", the Admin UI app will determine the hostname from the current location (i.e. window.location.hostname).

port

propertynumber | 'auto'
Default:'auto'

The port of the Vendure server which the admin UI will be making API calls to. If set to "auto", the Admin UI app will determine the port from the current location (i.e. window.location.port).

adminApiPath

propertystring
Default:'admin-api'

The path to the GraphQL Admin API.

tokenMethod

property'cookie' | 'bearer'
Default:'cookie'

Whether to use cookies or bearer tokens to track sessions. Should match the setting of in the server's tokenMethod config option.

authTokenHeaderKey

propertystring
Default:'vendure-auth-token'

The header used when using the 'bearer' auth method. Should match the setting of the server's authOptions.authTokenHeaderKey config option.

channelTokenKey

propertystring
Default:'vendure-token'

The name of the header which contains the channel token. Should match the setting of the server's apiOptions.channelTokenKey config option.

Options used by the vendureDashboardPlugin to configure aspects of the Dashboard UI behaviour.

Signature

defaultLanguage

propertyLanguageCode
Default:<a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>.en

The default language for the Admin UI. Must be one of the items specified in the availableLanguages property.

defaultLocale

propertystringv2.2.0

The default locale for the Admin UI. The locale affects the formatting of currencies & dates. Must be one of the items specified in the availableLocales property.

If not set, the browser default locale will be used.

availableLanguages

propertyLanguageCode[]

An array of languages for which translations exist for the Admin UI.

availableLocales

propertystring[]v2.2.0

An array of locales to be used on Admin UI.

Options used by the vendureDashboardPlugin to configure order-related Dashboard UI behaviour.

Signature

refundReasons

propertyArray<{ value: string; label: string }>

An array of refund reasons to display in the refund order dialog. Each reason has a value (used as the identifier) and a label (displayed to the user). If not provided, default reasons will be used.

Options used by the vendureDashboardPlugin to configure aspects of the Dashboard UI behaviour.

Signature

api

propertyApiConfig

Configuration for API connection settings

i18n

propertyI18nConfig

Configuration for internationalization settings

orders

propertyOrdersConfig

Configuration for order-related settings

Was this chapter helpful?
Report Issue
Edited Feb 23, 2026ยทEdit this page