browser-extension-manager 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -189,6 +189,14 @@ async function compileManifest(outputDir) {
|
|
|
189
189
|
// Add package version to manifest
|
|
190
190
|
manifest.version = project.version;
|
|
191
191
|
|
|
192
|
+
// Add Firefox compatibility for background scripts
|
|
193
|
+
// Firefox MV3 uses "scripts" array instead of "service_worker"
|
|
194
|
+
// Chrome ignores "scripts", Firefox ignores "service_worker"
|
|
195
|
+
if (manifest.background?.service_worker && !manifest.background?.scripts) {
|
|
196
|
+
manifest.background.scripts = [manifest.background.service_worker];
|
|
197
|
+
logger.log(`Added Firefox-compatible background.scripts`);
|
|
198
|
+
}
|
|
199
|
+
|
|
192
200
|
// Save as regular JSON
|
|
193
201
|
jetpack.write(outputPath, JSON.stringify(manifest, null, 2));
|
|
194
202
|
|