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.
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.
| 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. |