Skip to content

Latest commit

 

History

History
44 lines (42 loc) · 1.27 KB

ManifestV3Migration.md

File metadata and controls

44 lines (42 loc) · 1.27 KB

Migrate from Manifest V2 to V3

  1. Update the Blazor.BrowserExtension NuGet package version to at least v0.10.0.
  2. Update target framework to net7.0 and all .Net packages to .Net 7.
  3. Update the manifest.json file
    • Update manifest_version
      "manifest_version": 3,
    • Update background
      "background": {
        "service_worker": "BackgroundWorker.js",
        "type": "module"
      },
    • Update browser_action
      "action": {
        "default_popup": "popup.html"
      },
    • Update content_security_policy
      "content_security_policy": {
        "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
      }
    • Update web_accessible_resources
      "web_accessible_resources": [
        {
          "resources": [
            ...
          ],
          "matches": [ "<all_urls>" ]
        }
      ]
  4. Move all the codes from Background.razor to BackgroundWorker.js
    • Create a new file BackgroundWorker.js in wwwroot.
    • Remove Background.razor
    • Refer to this guide for migrating from background page to background service worker.