parcel-bundler/parcel

webextension: add support for `options_page` key

Open

#10,076 opened on Jan 22, 2025

View on GitHub
聽(2 comments)聽(0 reactions)聽(0 assignees)JavaScript聽(44,030 stars)聽(2,274 forks)batch import
Good First Issue

Description

馃檵 feature request

Chrome supports two keys to specify the options page:

  • options_ui
  • options_page

MDN reports that options_page is deprecated and so does Parcel's schema:

https://github.com/parcel-bundler/parcel/blob/53633df12ad9bba5d6ed5360e935fde8de0342fe/packages/transformers/webextension/src/schema.js#L289

However that doesn't reflect reality, Chrome does not deem the key deprecated in their docs and even Firefox eventually added support for it: https://bugzilla.mozilla.org/show_bug.cgi?id=1816960

You can find further reasoning in the bugzilla.

馃 Expected Behavior

options_page should be equivalent to options_ui.page

馃槸 Current Behavior

The key is ignored and the specified options.html is not processed.

馃捇 manifest.json demo

{
	"$schema": "https://json.schemastore.org/chrome-manifest",
	"name": "options_page minimal extension",
	"version": "0.0.0",
	"manifest_version": 3,
	"options_page": "options.html"
}

Contributor guide

webextension: add support for `options_page` key 路 parcel-bundler/parcel#10076 | Good First Issue