---
url: https://lit-ui-router.dev/api/lit-ui-router-ssr/vite.md
---
[lit-ui-router-ssr](../index.md) / vite

# vite

The Vite plugin for a Lit app: `ui-router-server/vite`'s
`serverRouterPlugin`, with the prerender worker set up for Lit. It names
a DOM shim (`@lit-labs/ssr`'s by default) and `lit-ui-router-ssr/register` as preloads, so
the prerender script imports the app, the router and this package
statically, and `definePrerender` calls this package's `prerender()` with
the options the script returns.

Nothing here imports Lit, `@lit-labs/ssr` or Vite, so `vite.config.ts`
loads it without defining an element or installing a global in Vite's
process.

## Interfaces

* [PrerenderBuild](interfaces/PrerenderBuild.md)
* [ServerRouterPlugin](interfaces/ServerRouterPlugin.md)
* [ServerRouterPluginOptions](interfaces/ServerRouterPluginOptions.md)

## Type Aliases

* [PrerenderEntry](type-aliases/PrerenderEntry.md)
* [PrerenderScript](type-aliases/PrerenderScript.md)
* [PrerenderScriptOptions](type-aliases/PrerenderScriptOptions.md)

## Functions

* [definePrerender](functions/definePrerender.md)
* [serverRouterPlugin](functions/serverRouterPlugin.md)
