Skip to content

lit-ui-router-ssr / vite / ServerRouterPlugin

Interface: ServerRouterPlugin ​

Defined in: packages/ui-router-server/dist/vite.d.ts:103

A structural subset of Vite's Plugin — assignable into plugins: [...].

Properties ​

PropertyTypeDescriptionDefined in
closeBundle{ handler(this, error?): Promise<void>; order: "post"; sequential: true; }Runs the prerender entry once the client build has written its output.packages/ui-router-server/dist/vite.d.ts:113
closeBundle.handler(this, error?) => Promise<void>The build step; a no-op without prerender.packages/ui-router-server/dist/vite.d.ts:119
closeBundle.order"post"After every other plugin's closeBundle.packages/ui-router-server/dist/vite.d.ts:115
closeBundle.sequentialtrueNot alongside them.packages/ui-router-server/dist/vite.d.ts:117
namestringThe plugin name Vite reports in errors and logs.packages/ui-router-server/dist/vite.d.ts:105

Methods ​

configResolved() ​

ts
configResolved(config): void;

Defined in: packages/ui-router-server/dist/vite.d.ts:107

Reads the root, the output directory and the logger.

Parameters ​

ParameterType
configViteResolvedConfig

Returns ​

void


configurePreviewServer() ​

ts
configurePreviewServer(server): void;

Defined in: packages/ui-router-server/dist/vite.d.ts:111

Installs the same middleware into vite preview, serving the prerendered pages when there are any.

Parameters ​

ParameterType
serverViteMiddlewareServer

Returns ​

void


configureServer() ​

ts
configureServer(server): void;

Defined in: packages/ui-router-server/dist/vite.d.ts:109

Installs the middleware into vite dev, synchronously so it lands in the PRE position.

Parameters ​

ParameterType
serverViteMiddlewareServer

Returns ​

void