Chrome is deprecating the Manifest v2 From June 2024. And this post will show you the steps to convert your extension with Manifest v2 to Manifest v3.
Google has given enough time to migrate to v3. The v3 manifest was first introduced in Dec 2020 (Chrome version M88 Beta), and Google has given developers more than 3 years for phasing out v2.
Changes required to Convert v2 Manifest to V3 for Chrome Extensions
The most changes you need are in the manifest.json:
Here are the details required to modify for manifest.json
manifest_version
This needs to be changed to 3 (from value 2)
browser_action
This needs to be renamed to “action”
web_accessible_resources
The v2 manifest looks like:
"web_accessible_resources": [ "js/*", "images/*", "bs/*" ],
For v3 manifest, it has to be updated to:
"web_accessible_resources": [{ "resources": ["js/*", "images/*", "bs/*"], "extension_ids": ["olpihmabpjpllgmahlgiakkgaccigpfo"] }],
background/scripts
This needs to be changed from v2:
"background": { "scripts": ["js/background.js"] },
to v3 manifest:
"background": { "service_worker": "js/background.js" },
That is the minimum requirement to convert the v2 Manifest to v3. However, you might need more changes for v3, as there are other requirements such as restricted APIs, for more information, please see Manifest V3
For example, the eval function is not supported in Google Chrome Extension Manifest v3 anymore (see this).
–EOF (The Ultimate Computing & Technology Blog) —
loading...
Last Post: How to Enable the "God Mode" of Control Panel on Windows?
Next Post: Teaching Kids Programming - Split the Numbers into Two Distinct Arrays