Skip to content

API > wxt > WxtBuilderServer

Interface: WxtBuilderServer

Contents

Properties

watcher

watcher: FSWatcher

Chokidar file watcher instance.

Source

packages/wxt/src/types.ts:1081


ws

ws: object

The web socket server used to communicate with the extension.

Type declaration

on()

Listen for messages over the server's websocket.

Parameters

message: string

cb: (payload) => void

send()

Send a message via the server's websocket, with an optional payload.

Parameters

message: string

payload?: any

Returns
Example
ts
ws.send("wxt:reload-extension");
ws.send("wxt:reload-content-script", { ... });

Source

packages/wxt/src/types.ts:1064

Methods

close()

close(): Promise<void>

Stop the server.

Source

packages/wxt/src/types.ts:1052


listen()

listen(): Promise<void>

Start the server.

Source

packages/wxt/src/types.ts:1048


transformHtml()

transformHtml(url, html, originalUrl?): Promise<string>

Transform the HTML for dev mode.

Parameters

url: string

html: string

originalUrl?: string

Source

packages/wxt/src/types.ts:1056


Generated using typedoc-plugin-markdown and TypeDoc