0

I'm using ReactJS + Typescript to create a chrome extension, but when I use the "npm run build" the manifest.json removes one line '"permissions": ["history" ],' when the build is finished.

Before the command "npm run build":

{
  "name": "Hello Extensions",
  "description": "Base Level Extension",
  "version": "1.0",
  "permissions": ["history" ],
  "manifest_version": 2,
  "browser_action": {
    "default_popup": "index.html",
    "default_title": "Open the popup"
  },
  "icons": {
    "16": "logo192.png",
    "48": "logo192.png",
    "128": "logo192.png"
  }
}

After the command:

{
  "name": "Hello Extensions",
  "description": "Base Level Extension",
  "version": "1.0",
  "manifest_version": 2,
  "browser_action": {
    "default_popup": "index.html",
    "default_title": "Open the popup"
  },
  "icons": {
    "16": "logo192.png",
    "48": "logo192.png",
    "128": "logo192.png"
  }
}

What can I do to stop this from happening?

David Radianu
  • 129
  • 1
  • 9
  • Your question has both the chrome-extension-manifest-v2 and chrome-extension-manifest-v3 tags, but your manifest.json uses version 2. Which Manifest version do you plan to use, and why? – Thomas Mueller Dec 14 '22 at 12:45

0 Answers0