adapt manifest background for firefox

This commit is contained in:
Son NK
2024-04-09 15:11:43 +02:00
parent ffc0092da3
commit 06b121d827
4 changed files with 26 additions and 17 deletions
+12 -1
View File
@@ -116,6 +116,17 @@ const config = {
jsonContent.browser_specific_settings.gecko.id = geckoId.replace('@', '-beta@');
}
if (process.env.FIREFOX) {
jsonContent.background = {
"scripts": ["background.js"]
}
} else { // CHROME
jsonContent.background = {
"service_worker": "background.js",
"type": "module"
}
}
if (process.env.LITE) {
// Remove "All sites" permissions
const PERMISSIONS_TO_REMOVE = [
@@ -190,4 +201,4 @@ if (config.mode === 'production') {
config.devtool="cheap-source-map";
}
module.exports = config;
module.exports = config;