Skip to content

fix: build separate Chromium and Firefox packages - #22

Merged
danielededo merged 1 commit into
mainfrom
fix/per-browser-manifest
Oct 11, 2026
Merged

danielededo merged 1 commit into
mainfrom
fix/per-browser-manifest

Conversation

@danielededo

Copy link
Copy Markdown
Owner

Edge Add-ons rejected spectral-0.1.0.zip: The background.scripts field cannot be used with manifest version 3. The single manifest declared both service_worker (Chromium) and scripts (Firefox, which has no background service workers).

  • public/manifest.json → src/manifest.json, without a background key. scripts/manifest.ts is a small Vite plugin that emits manifest.json with the bundle: Chromium gets background.service_worker and no browser_specific_settings, Firefox gets background.scripts (unit-tested in scripts/manifest.test.ts).
  • npm run build / npm run dev now write dist/ (Chrome, Edge, Safari, e2e) and dist-firefox/; the firefox:* scripts point at dist-firefox/. e2e/tsconfig.json allows .ts imports, which Node needs to run scripts/build.ts.
  • CI uploads spectral-chromium and spectral-firefox artifacts; the Release workflow attaches spectral-<version>-chromium.zip and spectral-<version>-firefox.zip.
  • Version bumped to 0.1.1 (v0.1.0 stays as published). README, AGENTS.md, STORE-LISTING and CHANGELOG updated.

Checks run locally: npm run check (49 tests passed), npm run build (both outputs, nine files each), npm run firefox:lint on dist-firefox/ (0 errors, 0 warnings: the old expected warning is gone), watch mode writes both manifests. npm run test:e2e could not run locally (Playwright's Chromium is missing libnspr4.so in this WSL), so it relies on CI. The Safari workflow now converts a service_worker-only build and has not been run with this change.

@danielededo
danielededo merged commit 9d8c4b2 into main Oct 11, 2026
2 checks passed
@danielededo
danielededo deleted the fix/per-browser-manifest branch October 11, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant