Interface: WxtBuilderServer
Contents
Properties
watcher
watcher:
FSWatcher
Chokidar file watcher instance.
Source
packages/wxt/src/types/index.ts:1020
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
ws.send("wxt:reload-extension");
ws.send("wxt:reload-content-script", { ... });
Source
packages/wxt/src/types/index.ts:1003
Methods
close()
close():
Promise
<void
>
Stop the server.
Source
packages/wxt/src/types/index.ts:991
listen()
listen():
Promise
<void
>
Start the server.
Source
packages/wxt/src/types/index.ts:987
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/index.ts:995
Generated using typedoc-plugin-markdown and TypeDoc