1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 22:44:11 +00:00

Fix Firefox MV3

This commit is contained in:
Justin Baur
2024-11-11 12:51:01 -05:00
parent 19d54c0baf
commit 1647761f76
2 changed files with 21 additions and 1 deletions

View File

@@ -85,6 +85,21 @@
"webRequest",
"webRequestAuthProvider"
],
"__firefox__permissions": [
"activeTab",
"alarms",
"clipboardRead",
"clipboardWrite",
"contextMenus",
"idle",
"scripting",
"storage",
"tabs",
"unlimitedStorage",
"webNavigation",
"webRequest",
"webRequestAuthProvider"
],
"optional_permissions": ["nativeMessaging", "privacy"],
"__firefox__optional_permissions": ["nativeMessaging"],
"__safari__optional_permissions": null,
@@ -93,6 +108,9 @@
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'",
"sandbox": "sandbox allow-scripts; script-src 'self'"
},
"__firefox__content_security_policy": {
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
},
"sandbox": {
"pages": [
"overlay/menu-button.html",

View File

@@ -335,6 +335,8 @@ if (manifestVersion == 2) {
}),
);
const target = browser === "firefox" ? "web" : "webworker";
/**
* @type {import("webpack").Configuration}
*/
@@ -343,7 +345,7 @@ if (manifestVersion == 2) {
mode: ENV,
devtool: false,
entry: "./src/platform/background.ts",
target: "webworker",
target: target,
output: {
filename: "background.js",
path: path.resolve(__dirname, "build"),