---
url: /api/reference/wxt/interfaces/WxtModuleWithMetadata.md
---

[API](../../packages.md) / [wxt](../index.md) / WxtModuleWithMetadata

# Interface: WxtModuleWithMetadata\<TOptions>

Source: [packages/wxt/src/types.ts:1883](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1883)

## Contents

* [Extends](#extends)
* [Type Parameters](#type-parameters)
  * [TOptions](#toptions)
* [Properties](#properties)
  * [configKey?](#configkey)
  * [hooks?](#hooks)
  * [id](#id)
  * [imports?](#imports)
  * [name?](#name)
  * [setup?](#setup)
  * [type](#type)

## Extends

* [`WxtModule`](WxtModule.md)<`TOptions`>

## Type Parameters

### TOptions

`TOptions` *extends* [`WxtModuleOptions`](../type-aliases/WxtModuleOptions.md)

## Properties

### configKey?

> `optional` **configKey?**: `string`

Source: [packages/wxt/src/types.ts:1868](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1868)

Key for users to pass options into your module from their `wxt.config.ts`
file.

#### Inherited from

[`WxtModule`](WxtModule.md).[`configKey`](WxtModule.md#configkey)

***

### hooks?

> `optional` **hooks?**: `NestedHooks`<[`WxtHooks`](WxtHooks.md)>

Source: [packages/wxt/src/types.ts:1875](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1875)

Alternative to adding hooks in setup function with `wxt.hooks`. Hooks are
added before the `setup` function is called.

#### Inherited from

[`WxtModule`](WxtModule.md).[`hooks`](WxtModule.md#hooks)

***

### id

> **id**: `string`

Source: [packages/wxt/src/types.ts:1887](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1887)

***

### imports?

> `optional` **imports?**: `Import`\[]

Source: [packages/wxt/src/types.ts:1870](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1870)

Provide a list of imports to add to auto-imports.

#### Inherited from

[`WxtModule`](WxtModule.md).[`imports`](WxtModule.md#imports)

***

### name?

> `optional` **name?**: `string`

Source: [packages/wxt/src/types.ts:1863](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1863)

#### Inherited from

[`WxtModule`](WxtModule.md).[`name`](WxtModule.md#name)

***

### setup?

> `optional` **setup?**: [`WxtModuleSetup`](../type-aliases/WxtModuleSetup.md)<`TOptions`>

Source: [packages/wxt/src/types.ts:1880](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1880)

A custom function that can be used to setup hooks and call module-specific
APIs.

#### Inherited from

[`WxtModule`](WxtModule.md).[`setup`](WxtModule.md#setup)

***

### type

> **type**: `"local"` | `"node_module"`

Source: [packages/wxt/src/types.ts:1886](https://github.com/wxt-dev/wxt/blob/1df3d8c5ec00b7543f6aec7fa00ebc242db1ca30/packages/wxt/src/types.ts#L1886)

***

Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
