---
url: /api/reference/modules/functions/addPublicAssets.md
---

[API](../../packages.md) / [modules](../index.md) / addPublicAssets

# Function: addPublicAssets()

> **addPublicAssets**(`wxt`, `dir`): `void`

Source: [packages/wxt/src/modules/index.ts:77](https://github.com/wxt-dev/wxt/blob/972fe87151a882800f7855a3951c70cef4441659/packages/wxt/src/modules/index.ts#L77)

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`](../../wxt/interfaces/Wxt.md)

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](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
