tshaddix / webext-redux

A set of utilities for building Redux applications in Web Extensions.
MIT License
1.22k stars 179 forks source link

Manifest V3 #297

Closed SidneyNemzer closed 2 weeks ago

SidneyNemzer commented 1 month ago

This PR builds on the excellent work by @eduardoacskimlinks (#282), which is included in this PR.

  1. Removed ports, use sendMessage directly instead. This fixes a problem where the port stops working when the service worker sleeps. (by @eduardoacskimlinks)
  2. Add event listeners when the service worker starts via createWrapStore(). This addresses an issue where webext-redux wouldn't process dispatches or other messages if the message woke the service worker. This is a breaking change but I believe required for MV3. See diagram below and commit for details. https://github.com/tshaddix/webext-redux/pull/297/commits/bf485ad4a43bfb04055f07c08da32f7f4e79f545
  3. Removed the ability to connect to stores in other extensions (ie new Store({ extensionId: '...' })). See details in the commit message. https://github.com/tshaddix/webext-redux/pull/297/commits/5c7d998f5ccf94b3b905588009b04f558c8ec27d
Diagram for (2)

![](https://github.com/tshaddix/webext-redux/assets/21203108/8c2f9fc5-7985-4e7b-9cda-ccd984f65cc0)

Closes #284, closes #244

TODO: (rough order)