Safari web extension manfiest.json bug

46 Views Asked by At

This is my chrome manifest.json file and it works perfectly fine for chrome, but when i convert the chrome extension to safari extension using xcrun safari-web-extension-converter ./my-chrome-extension/dist it gives this warning

Warning: The following keys in your manifest.json are not supported by your current version of Safari. If these are critical to your extension, you should review your code to see if you need to make changes to support Safari:
type
use_dynamic_url

Safari version : 17.1.2

manifest.json

{
  "manifest_version": 3,
  "name": "My Extension",
  "version": "1.0.0",
  "action": {
    "default_title": "Popup",
    "default_popup": "index.html"
  },
  "icons": {
    "16": "assets/icons/icon16.png",
    "32": "assets/icons/icon32.png",
    "48": "assets/icons/icon48.png",
    "128": "assets/icons/icon128.png"
  },
  "description": "My description.",
  "background": {
    "service_worker": "background/background.js"
  },
  "web_accessible_resources": [
    {
      "resources": ["assets/placeholder/image_placeholder.jpg"],
      "matches": ["<all_urls>"]
    }
  ],
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["content-script/src/main.tsx"]
    }
  ]
}

package.json

{
  "name": "react-content-script",
  "private": true,
  "version": "1.0.1",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "bootstrap": "^5.3.2",
    "react": "^18.2.0",
    "react-bootstrap": "^2.9.2",
    "react-dom": "^18.2.0",
    "react-shadow-root": "^6.2.0",
    "web-vitals": "^3.0.3"
  },
  "devDependencies": {
    "@crxjs/vite-plugin": "@crxjs/[email protected]",
    "@types/chrome": "^0.0.197",
    "@types/node": "^18.8.3",
    "@types/react": "^18.0.17",
    "@types/react-dom": "^18.0.6",
    "@vitejs/plugin-react": "^2.1.0",
    "autoprefixer": "^10.4.16",
    "crx-hotreload": "^1.0.6",
    "postcss": "^8.4.32",
    "tailwindcss": "^3.4.0",
    "typescript": "^4.6.4",
    "vite": "^3.1.0",
    "vite-plugin-svgr": "^2.2.1"
  }
}

Any documentation, any reference, any solution which could fix this problem would of great help!

Thank you.

0

There are 0 best solutions below