samrum / vite-plugin-web-extension

A vite plugin for generating cross browser platform, ES module based web extensions.
MIT License
331 stars 32 forks source link

Feat Request: Set hash route in manifest entry file. #90

Closed imrockpan closed 1 year ago

imrockpan commented 1 year ago

I really hope that hash route can be set in the manifest entry file. It is very useful in the following usage scenarios:

{
  // ...
  "action": {
    "default_popup": "src/app.html#/popup/dashboard"
  },
  "options_page": "src/app.html#/options",
  // ...
}

Multiple pages are in App, it can reduce my template code.

samrum commented 1 year ago

It seems like Chrome supports hashes and even query parameters in manifest.json, so it should be possible.

Would need to update the input/output parsing of manifest HTML files so they're maintained on builds.

imrockpan commented 1 year ago

It seems like Chrome supports hashes and even query parameters in manifest.json, so it should be possible.

Would need to update the input/output parsing of manifest HTML files so they're maintained on builds.

That's great, thanks for responding so quickly. 🙏 Super awesome plugin, saved me a lot of time. 🚀