---
title: "Vite"
description: "Wraps a DevframeDefinition so Vite DevTools' kit plugin-scan picks it up. The factory lives in @vitejs/devtools-kit/node, keeping devframe Vite-free."
canonical_url: "https://devfra.me/adapters/vite"
---
# Vite

> Wraps a DevframeDefinition so Vite DevTools' kit plugin-scan picks it up. The factory lives in @vitejs/devtools-kit/node, keeping devframe Vite-free.

Wraps a `DevframeDefinition` so Vite DevTools' kit plugin-scan picks it up. The factory lives in `@vitejs/devtools-kit/node`, keeping devframe Vite-free.

```ts
import { createPluginFromDevframe } from '@vitejs/devtools-kit/node'
import myDevframe from './my-tool'

export default function myVitePlugin() {
  return createPluginFromDevframe(myDevframe)
}
```

The returned object has the shape `{ name, devtools: { setup, capabilities } }`. See [DevTools Plugin](https://devtools.vite.dev/kit/devtools-plugin).

| Option  | Default                    | Description                                                               |
| ------- | -------------------------- | ------------------------------------------------------------------------- |
| `name`  | `devframe:<id>`            | Plugin name.                                                              |
| `base`  | `def.basePath ?? /.${id}/` | Mount path override.                                                      |
| `dock`  | `{}`                       | Overrides for the iframe dock entry (category, icon, when).               |
| `setup` | none                       | Setup hook run only in the Vite host; receives the kit-augmented context. |


## Sitemap

See the full [sitemap](https://devfra.me/sitemap.md) for all pages.
