Manifest

The core browser extension file and the source of truth for Extension.js asset generation.

Extension.js supports all major fields for Manifest V2 and V3 across Chrome, Firefox, Edge, and other browsers. It processes the manifest fields and their associated files like HTML, JavaScript, CSS, icons, and JSON, ensuring they are treated as entry points in your project.

Manifest Support

Except for browser Themes, Extension.js offers full Chrome Manifest V2 and V3 support and plans to cover all manifest features in a cross-browser way, following the MDN compatibility table. If there is a feature that is not covered but should be, you are encouraged to open an issue.

Supported Manifest Fields

Below is a table of manifest fields supported by Extension.js. These fields act as entry points in your extension project.

Manifest Field File Type Expected
action.default_popup .html
background.page .html
background.service_worker .js, .jsx, .ts, .tsx, .mjs
browser_action.default_popup .html
chrome_url_overrides.bookmarks .html
chrome_url_overrides.history .html
chrome_url_overrides.newtab .html
content_scripts.js .js, .jsx, .ts, .tsx, .mjs
content_scripts.css .css, .scss, .sass, .less
declarative_net_request.rule_resources .json
devtools_page .html
icons .png, .jpg, ...Other image formats
options_ui.page .html
page_action.default_popup .html
sandbox.pages .html
sidepanel .html
sidebar_action.default_panel .html
storage.managed_schema .json
theme_icons .png, .jpg, ...Other image formats
user_scripts.api_script .js, .jsx, .ts, .tsx, .mjs
web_accessible_resources .png, .jpg, .css, .js

Cross-Browser Compatibility

When developing cross-browser extensions, it's important to account for minor differences between how browsers interpret the manifest file. Extension.js has built-in compatibility handling to ensure that your manifest works across all supported browsers.

Manifest Support

Best Practices

  • Use the correct file types: Ensure that the file types you use match the expected file types for each manifest field.
  • Follow the browser compatibility table: Check the MDN compatibility table to ensure that your manifest is compatible with all supported browsers.
  • Use browser-specific fields: If you need to use browser-specific fields, make sure to include them in your manifest and handle them accordingly in your project.

Next Steps

  • Learn how Extension.js handles Manifest Compatibility to avoid browser-specific issues.
  • Explore how Extension.js works with Special Folders to handle additional HTML, scripts, and assets in your project.