diff --git a/add-on/manifest.chromium.json b/add-on/manifest.chromium.json index feb693edf..f0c5f70bd 100644 --- a/add-on/manifest.chromium.json +++ b/add-on/manifest.chromium.json @@ -1,5 +1,5 @@ { - "minimum_chrome_version": "101", + "minimum_chrome_version": "111", "permissions": [ "clipboardWrite", "contextMenus", diff --git a/add-on/manifest.firefox.json b/add-on/manifest.firefox.json index 53ab00945..6a4ca4bec 100644 --- a/add-on/manifest.firefox.json +++ b/add-on/manifest.firefox.json @@ -5,14 +5,17 @@ "options_ui": { "browser_style": false }, + "background": { + "service_worker": "", + "scripts": ["dist/bundles/backgroundPage.firefox.bundle.js"] + }, "browser_specific_settings": { "gecko": { "id": "ipfs-firefox-addon@lidel.org", - "strict_min_version": "109.0.0" + "strict_min_version": "111.0.0" } }, "permissions": [ - "", "idle", "tabs", "notifications", diff --git a/webpack.config.js b/webpack.config.js index b9dbbdf08..0162aef5e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -165,6 +165,18 @@ const bgConfig = merge(commonConfig, { } }) +/** + * background page bundle (with heavy dependencies) + * @type {import('webpack').Configuration} + */ +const bgFirefoxConfig = merge(bgConfig, { + target: 'web', + output: { + filename: '[name].firefox.bundle.js', + globalObject: 'window' + } +}) + /** * user interface pages with shared common libraries * @type {import('webpack').Configuration} @@ -209,6 +221,7 @@ const contentScriptsConfig = merge(commonConfig, { const config = [ bgConfig, + bgFirefoxConfig, uiConfig, contentScriptsConfig ]