Skip to content

API > wxt/modules > addPublicAssets

Function: addPublicAssets()

addPublicAssets(wxt, dir): void

Copy files inside a directory (as if it were the public directory) into the extension's output directory. The directory itself is not copied, just the files inside it. If a filename matches an existing one, it is ignored.

Parameters

wxt: Wxt

The wxt instance provided by the module's setup function.

dir: string

The directory to copy.

Returns

Example

ts
export default defineWxtModule((wxt, options) => {
  addPublicAssets(wxt, "./dist/prebundled");
});

Source

packages/wxt/src/modules.ts:74


Generated using typedoc-plugin-markdown and TypeDoc