Use webextension-polyfill with WXT
npm install @wxt-dev/webextension-polyfill@wxt-dev/webextension-polyfillConfigures wxt/browser to import browser from webextension-polyfill instead of using the regular chrome/browser globals WXT normally provides.
``sh`
pnpm i @wxt-dev/webextension-polyfill webextension-polyfill
Then add the module to your config:
`ts``
// wxt.config.ts
export default defineConfig({
modules: ['@wxt-dev/webextension-polyfill'],
});