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

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

# Interface: WxtModule\<TOptions>

Source: [packages/wxt/src/types.ts:1862](https://github.com/wxt-dev/wxt/blob/7594a4ca5cae24d0d5d705ed0d3ff1347b306e7b/packages/wxt/src/types.ts#L1862)

## Contents

* [Extended by](#extended-by)
* [Type Parameters](#type-parameters)
  * [TOptions](#toptions)
* [Properties](#properties)
  * [configKey?](#configkey)
  * [hooks?](#hooks)
  * [imports?](#imports)
  * [name?](#name)
  * [setup?](#setup)

## Extended by

* [`WxtModuleWithMetadata`](WxtModuleWithMetadata.md)

## 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/7594a4ca5cae24d0d5d705ed0d3ff1347b306e7b/packages/wxt/src/types.ts#L1868)

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

***

### hooks?

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

Source: [packages/wxt/src/types.ts:1875](https://github.com/wxt-dev/wxt/blob/7594a4ca5cae24d0d5d705ed0d3ff1347b306e7b/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.

***

### imports?

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

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

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

***

### name?

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

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

***

### setup?

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

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

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

***

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