From 1692d5bfa81a7cfb346d3c2296dee8b7d7f66e66 Mon Sep 17 00:00:00 2001 From: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Date: Tue, 18 Apr 2023 19:27:05 +0200 Subject: [PATCH] saving state --- add-on/manifest.chromium.json | 2 +- add-on/manifest.firefox.json | 7 +++++-- webpack.config.js | 13 +++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) 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 ]