API › @qwik.dev/router/vite

extendConfig

export declare function extendConfig(
  baseConfigExport: UserConfigExport,
  serverConfigExport: UserConfigExport,
): (env: ConfigEnv) => Promise<Record<string, any>>;

Parameter

Type

Description

baseConfigExport

UserConfigExport

serverConfigExport

UserConfigExport

Returns:

(env: ConfigEnv) => Promise<Record<string, any>>

Edit this section

MdxOptions

export type MdxOptions = CompileOptions;

Edit this section

qwikCity

Warning: This API is now obsolete.

Use qwikRouter instead. Will be removed in V3

export declare function qwikCity(
  userOpts?: QwikCityVitePluginOptions,
): PluginOption[];

Parameter

Type

Description

userOpts

QwikCityVitePluginOptions

(Optional)

Returns:

PluginOption[]

Edit this section

QwikCityPlugin

Warning: This API is now obsolete.

Use QwikRouterPlugin instead. Will be removed in V3

export type QwikCityPlugin = QwikRouterPlugin;

References: QwikRouterPlugin

Edit this section

QwikCityVitePluginOptions

Warning: This API is now obsolete.

Use QwikRouterVitePluginOptions instead. Will be removed in V3

export type QwikCityVitePluginOptions = QwikRouterVitePluginOptions;

References: QwikRouterVitePluginOptions

Edit this section

qwikRouter

export declare function qwikRouter(
  userOpts?: QwikRouterVitePluginOptions,
): PluginOption[];

Parameter

Type

Description

userOpts

QwikRouterVitePluginOptions

(Optional)

Returns:

PluginOption[]

Edit this section

QwikRouterPlugin

export interface QwikRouterPlugin extends P<QwikRouterPluginApi>

Extends: P<QwikRouterPluginApi>

Property

Modifiers

Type

Description

name

'vite-plugin-qwik-router'

Edit this section

QwikRouterVitePluginOptions

export interface QwikRouterVitePluginOptions extends Omit<PluginOptions, 'basePathname'>

Extends: Omit<PluginOptions, 'basePathname'>

Property

Modifiers

Type

Description

devSsrServer?

boolean

(Optional) Qwik is an SSR first framework. This means that Qwik requires either SSR or SSG. In Vite dev mode the dev SSR server is responsible for rendering and pausing the application on the server.

Under normal circumstances this should be on, unless you have your own dev SSR server setup and wish to disable this one.

Default: true

imageOptimization?

ImageOptimizationOptions

(Optional)

mdx?

MdxOptions

(Optional)

mdxPlugins?

MdxPlugins

(Optional)

platform?

Record<string, unknown>

(Optional)

ssrCacheSize?

number

(Optional) Maximum number of SSR-rendered pages to keep in the in-memory cache. Set to 0 to disable.

Default: 50

staticImportRoutes?

boolean

(Optional) Whether to use static imports for route modules (layout and index files). Defaults to false.

Edit this section