Skip to content

API > wxt > build

Function: build()

build(config?): Promise<BuildOutput>

Bundles the extension for production. Returns a promise of the build result. Discovers the wxt.config.ts file in the root directory, and merges that config with what is passed in.

Parameters

config?: InlineConfig

Returns

Example

ts
// Use config from `wxt.config.ts`
const res = await build()

// or override config `from wxt.config.ts`
const res = await build({
  // Override config...
})

Source

packages/wxt/src/core/build.ts:18


Generated using typedoc-plugin-markdown and TypeDoc