Skip to content

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.

ts
import { createPluginFromDevframe } from '@vitejs/devtools-kit/node'
import devframe from './devframe'

export default function myVitePlugin() {
  return createPluginFromDevframe(devframe)
}

The returned object has the shape { name, devtools: { setup, capabilities } }. See DevTools Plugin.

OptionDefaultDescription
namedevframe:<id>Plugin name.
basedef.basePath ?? /.${id}/Mount path override.
dock{}Overrides for the iframe dock entry (category, icon, when).
setup—Host-only setup hook; receives the kit-augmented context.

Released under the MIT License.