Bundling Chrome Extensions can be pretty complex. It doesn't have to be.
Bot releases are visible (Hide)
Published by jacksteamdev over 3 years ago
Thanks to @onikienko for helping us debug this!
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.5.5...v3.5.6
Published by jacksteamdev over 3 years ago
Thanks to @mnoorenberghe for the PR fixing sourcemaps!
This release also adds some better documentation and cleans up the codebase a little.
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.5.4...v3.5.5
Published by jacksteamdev over 3 years ago
This release adds support for content scripts in the manifest that end in .jsx
or .tsx
.
The "basic" test has also been renamed to "kitchen-sink", and new "basic-js" and "basic-ts" tests have been added to make it easier for contributors to make a PR.
Thanks to @ZakaryCode and @joegilley for their PRs pointing out the need for this feature!
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.5.3...v3.5.4
Published by jacksteamdev over 3 years ago
Fixes a bug where rollup-plugin-chrome-extension
would throw an error during the generateBundle
hook if there were unresolved dependencies. Now Rollup will show the external dependencies message instead.
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.5.2...v3.5.3
Published by jacksteamdev almost 4 years ago
The last release broke chunk file names and paths for non-entry modules, removing subfolders and adding double hashes to output files. The manifest retained the expected file names, but the files were named incorrectly.
This release fixes that problem. We've added some tests to make sure that the file names in the manifest always match the output file names.
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.5.1...v3.5.2
Published by jacksteamdev almost 4 years ago
This release has been a long time coming. It adds the option browserPolyfill
, which adds webextension-polyfill
to your Chrome extension. It also includes some improvements to the simpleReloader
and lays some groundwork for Firefox compatible builds.
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.5.0...v3.5.1
Published by jacksteamdev about 4 years ago
Thanks to @jones-sam for adding this feature and updating our Cheerio types!
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.3.0...v3.4.0
Published by jacksteamdev about 4 years ago
This release adds support to send a response to messages in the background page event wrapper. More info about this in #50
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.2.0...v3.3.0
Published by jacksteamdev over 4 years ago
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!
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.1.0...v3.2.0
Published by jacksteamdev over 4 years ago
This release adds two new dynamic import wrappers and refactors the old one.
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 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.
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.
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.0.1...v3.1.0
Published by jacksteamdev over 4 years ago
This major version removes the FCM based push reloader.
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v3.0.0-beta.1...v3.0.1
Published by jacksteamdev over 4 years ago
This release fixes the simple reloader and removes the push reloader completely.
Published by jacksteamdev over 4 years ago
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v2.2.3...v2.2.4
Published by jacksteamdev over 4 years ago
This release marks the migration to a new organization!
https://github.com/extend-chrome/rollup-plugin-chrome-extension/compare/v2.2.1...v2.2.2
Published by jacksteamdev over 4 years ago
This version fixes a bug in the simple reloader and updates the docs to warn that the push reloader does not currently work.
https://github.com/bumble-org/rollup-plugin-chrome-extension/compare/v2.2.0...v2.2.1
Published by jacksteamdev over 4 years ago
This release adds support for the devtools_tools
in manifest.json
, thanks to @witcher-development 👍
https://github.com/bumble-org/rollup-plugin-chrome-extension/compare/v2.1.3...v2.2.0
Published by jacksteamdev over 4 years ago
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.
https://github.com/bumble-org/rollup-plugin-chrome-extension/compare/v2.1.2...v2.1.3
Published by jacksteamdev over 4 years ago
This release improves Windows compatibility.
Published by jacksteamdev almost 5 years ago
The previous release did not include fresh builds of the lib and types folders.
A prepublishOnly
script has been added to prevent this in the future.
Published by jacksteamdev almost 5 years ago
This version marks a complete refactor of the tests, plus some bugfixes we encountered while working on the tests.
The reloaders have been reincorporated into the codebase and refactored into their own Rollup plugins, which should be imported into the Rollup config file. The docs have been updated to reflect this.
Some old config options (assets
and chunks
) became unneccessary during the refactor, so we removed them.