Skip to content

@extport/wxt

WXT module for extensions publishing through extport: one config block wires up store publishing metadata, license/analytics identity injection, manifest permission checks, and Safari’s Xcode project generation.

Terminal window
pnpm add -D @extport/wxt
pnpm add @extport/sdk # needed if you enable analytics or licensing
wxt.config.ts
export default defineConfig({
modules: ['@extport/wxt'],
manifest: {
permissions: ['storage'], // required when extport.extension is set
},
extport: {
extension: 'ext_…', // your extension's extport id
analytics: true, // optional: daily anonymous usage ping
safari: {
// optional: build a Safari App Store target
appCategory: 'public.app-category.productivity',
bundleIdentifier: 'com.example.my-extension',
developmentTeam: 'ABCDE12345',
},
},
})
  • extension — syncs the id into extport.config.json (the static file extport CLI and extport-dev/actions read), injects globalThis.__EXTPORT__.extensionId into every entrypoint so @extport/sdk resolves identity with zero hardcoding, and verifies at build time that manifest.permissions includes 'storage' (used by @extport/sdk for both licensing and analytics).
  • analytics: true — attaches the daily ping to your background entrypoint and adds Firefox’s data_collection_permissions (technicalAndInteraction) declaration to the manifest. Explicit opt-in; nothing is collected without it. Requires @extport/sdk as a dependency.
  • safari: { … } — on wxt build -b safari / wxt zip -b safari, converts the build output into a signed-ready Xcode project (projectType: 'macos' | 'ios' | 'both', default 'both', with a built-in setup page for macOS, iOS, and iPadOS) for extport safari-build to compile and upload.

wxt is a peer dependency (>=0.20). The 0.20.x line is what the module is battle-tested against; wxt 0.21.x currently ships an experimental Vite 8/Rolldown pipeline with known build issues independent of this module.

Docs: extport.dev/docs

MIT