Skip to content

API / wxt/modules / addPublicAssets

Function: addPublicAssets()

addPublicAssets(wxt, dir): void

Source: packages/wxt/src/modules.ts:75

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

void

Example

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

Generated using typedoc-plugin-markdown and TypeDoc