wxt-v0.20.4

wxt-dev/wxtwxt-v0.20.4Apr 25, 2025by github-actions[bot]

AI Summary

This release focuses on improving build error handling by adding ignore directives, introduces a new template variable, and fixes pathing and browser compatibility issues.

Key Highlights

  • Added `{{packageVersion}}` as a template variable
  • Improves error handling by ignoring specific files and attributes
  • Fixes CORS errors in Firefox
  • Enhanced documentation for Content Script UI lifecycle

New Features

  • Template variable `{{packageVersion}}`
  • Ignore directive attributes (`vite-ignore`, `wxt-ignore`)

Full Release Notes

[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.3...wxt-v0.20.4)

### 🚀 Enhancements

- Ignore popup/index.ts instead of erroring ([#1520](https://github.com/wxt-dev/wxt/pull/1520))
- Ignore elements with a `vite-ignore` or `wxt-ignore` attribute ([#1603](https://github.com/wxt-dev/wxt/pull/1603))
- Add `{{packageVersion}}` as template variable ([#1604](https://github.com/wxt-dev/wxt/pull/1604))

### 🩹 Fixes

- Adding missing `""` to `PublicPath` and `browser.runtime.getUrl` ([#1597](https://github.com/wxt-dev/wxt/pull/1597))
- Fix CORS error in Firefox ([#1607](https://github.com/wxt-dev/wxt/pull/1607))

### 📖 Documentation

- **Content Script UI:** Add additional details about when `onRemove` is called ([656a9b3](https://github.com/wxt-dev/wxt/commit/656a9b3))

### ❤️ Contributors

- Yunsup Sim <pedogunu@gmail.com>
- ТΞNSΛI <tensai@gmx.net>
- Nishu ([@nishu-murmu](https://github.com/nishu-murmu))
- Aaron ([@aklinker1](https://github.com/aklinker1))