API / wxt / BackgroundDefinition
Interface: BackgroundDefinition
Source: packages/wxt/src/types.ts:1051
Contents
Extends
Properties
exclude?
optionalexclude?:string[]
Source: packages/wxt/src/types.ts:691
List of target browsers to exclude this entrypoint from. Cannot be used with include. You must choose one of the two options.
Default
undefinedInherited from
BackgroundEntrypointOptions.exclude
include?
optionalinclude?:string[]
Source: packages/wxt/src/types.ts:684
List of target browsers to include this entrypoint in. Defaults to being included in all builds. Cannot be used with exclude. You must choose one of the two options.
Default
undefinedInherited from
BackgroundEntrypointOptions.include
persistent?
optionalpersistent?:PerBrowserOption<boolean>
Source: packages/wxt/src/types.ts:695
Inherited from
BackgroundEntrypointOptions.persistent
type?
optionaltype?:PerBrowserOption<"module">
Source: packages/wxt/src/types.ts:705
Set to "module" to output the background entrypoint as ESM. ESM outputs can share chunks and reduce the overall size of the bundled extension.
When undefined, the background is bundled individually into an IIFE format.
Default
undefinedInherited from
BackgroundEntrypointOptions.type
Methods
main()
main():
void
Source: packages/wxt/src/types.ts:1056
Main function executed when the background script is started. Cannot be async.
Returns
void
Generated using typedoc-plugin-markdown and TypeDoc