Universal DevTools Kit SDK / @u-devtools/core / DevToolsPlugin
Interface: DevToolsPlugin
Defined in: index.ts:603
DevTools Plugin Definition - Server-side plugin configuration. Defines a plugin's structure and entry points for all three execution contexts.
Created using definePlugin() helper from @u-devtools/kit/define-plugin.
Example
import { definePlugin } from '@u-devtools/kit/define-plugin';
export default definePlugin({
name: 'My Plugin',
root: import.meta.url,
client: './client',
app: './app',
server: './server',
});Properties
appPath?
optionalappPath:string
Defined in: index.ts:609
Absolute path to app.ts file (App context - main window)
clientPath?
optionalclientPath:string
Defined in: index.ts:607
Absolute path to client.ts file (Client context)
meta?
optionalmeta:PluginMetadata
Defined in: index.ts:618
Plugin metadata (name, version, description, etc.)
name
name:
string
Defined in: index.ts:605
Display name of the plugin
setupServer()?
optionalsetupServer: (rpc,ctx) =>void
Defined in: index.ts:616
Server-side setup function (Server context - Node.js). Called when plugin is loaded to register RPC handlers.
Parameters
| Parameter | Type | Description |
|---|---|---|
rpc | RpcServerInterface | RPC server interface for handling requests |
ctx | ServerContext | Server context with root path and Vite server instance |
Returns
void
vitePlugins?
optionalvitePlugins: () =>PluginOption|PluginOption[][]
Defined in: index.ts:623
Optional Vite plugins to be merged with the main DevTools plugin. These plugins will be added to the Vite configuration.
Returns
PluginOption | PluginOption[]