Chrome Extension – Migrating from Manifest V2 to V3
Chrome extensions have been using manifest version 2 for a very long time. Google recently announced that they are phasing out version 2 and introducing version 3. This new version represents one of the biggest shifts in the extensions since its inception in 2010. There has been a variety of new features introduced in manifest version 3 and extensions using this will enjoy security, privacy and performance enhancements.
Manifest V3 is a great means of improving your operational capacity on the extensions, along with boosting privacy and security. But, that is not all; there are many other changes that Manifest Version 3 brings to the table.
Here are some of them:
If you are an extension owner, then it’s important that you immediately update your source code to meet the requirements of Manifest V3. This is sometimes easier said than done. So, here is a quick checklist for you to go through to ensure that you have truly migrated to Manifest V3.
How to migrate to Manifest v3?
Updating manifest.json file
To use the features of Manifest V3, you need to first update your manifest file. Naturally, you’ll change the manifest version to “3”, but there are a number of other things you need to change in the manifest file: host permissions, content security policy, action declarations, and web-accessible resources.
Manifest version
This change will determine whether you are using the Manifest V2 or Manifest V3 features. Change the value of manifest_version to 3 in the manifest.json file:
API Checklist
There are some changes you may need to make based on changes to the API surface. This section lists these changes.
Do you have host permissions in your manifest?
Are you using background pages?
领英推荐
Are you using the browser_action or page_action property in manifest.json?
Are you using the chrome.browserAction or chrome.pageAction JavaScript API?
Are you currently using the blocking version of chrome.webRequest?
Are you executing remote code or arbitrary strings?
Are you executing functions that expect a Manifest V2 background context?
Security Checklist
There are some changes you may need to make based on changes in security policy.
We have a highly efficient and deploy-ready team with the expertise to ensure that your migration process to Manifest V3 is as smooth as possible. Since we understand that this can be a difficult process for many extension owners, we ensure that we work with you to achieve a hassle-free process.
Reach out to us with any queries that you may have, and we will get back to you at the earliest!