Releases: crxjs/chrome-extension-tools
Sending message responses
This release adds support to send a response to messages in the background page event wrapper. More info about this in #50
Supporting more input types and the WebRequest API
This release adds support for options.input
as an array and object, as well as fixes a bug in the background page import wrapper that was blocking use of the WebRequest API.
For now the new input type support is undocumented.
Thanks to @RoCat for the work on the WebRequest API!
Better dynamic import wrappers
This release adds two new dynamic import wrappers and refactors the old one.
Motivation
These wrappers are necessary because Rollup only supports ES6 modules when output.dir is used, which is necessary for this plugin to work the way that it does. Code splitting is also non-optional with output.dir. This means that we need all script environments to support ES6 modules.
However, in Chrome, background and content scripts do not support ES6 modules! They do support the dynamic import function, which allows us to async load modules into a script.
This introduces another complexity with non-persistent background pages. Events that wake the background page are fired at the end of first event loop, before the dynamic import completes. These import wrappers capture wake events and dispatch them after the dynamic import resolves.
Content Scripts
Content scripts now have their own import wrapper. It simply uses dynamic import to load the content script module and does nothing with events, since content scripts are always persistent.
Background Scripts
The new default import wrapper is the implicit import wrapper. It walks the chrome object and wraps any events that it finds. If your extension uses many permissions, the chrome object will have more namespaces, and it may take slightly more time (~15ms) to load the background page. Consider the following if 15ms is too much for you.
The old import wrapper is now the explicit import wrapper, and uses the same API as before. It is quite fast (~5ms), but wake events that are not defined in dynamicImportWrapper.wakeEvents will be lost. Symptoms of this would be things like having to click the browser action twice to register browserAction.onClicked, or missed events from alarms.onAlarm.
Pull Requests
- Update dynamic import wrappers 4b80336
RIP Push Reloader
This major version removes the FCM based push reloader.
- Fix reloader message formatting 04d461a
Fixing the simple reloader
This release fixes the simple reloader and removes the push reloader completely.
Fixing README links
- Update readme badge 05457dd
Migrating to @extend-chrome
This release marks the migration to a new organization!
Fixing the simple reloader
This version fixes a bug in the simple reloader and updates the docs to warn that the push reloader does not currently work.
v2.2.0
This release adds support for the devtools_tools
in manifest.json
, thanks to @witcher-development 👍
- Add support for devtools_page 1c5cf32
v2.1.3
This release fixes a bug where an attempt to bundle multiple files with the same base name but different extensions would emit a misleading error. Now the bundle will fail with a more useful error.
- Throw errors from reduceToRecord 567e8a1