Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Chrome Extension manifest V3 side_panel property. #9178

Merged
merged 4 commits into from
Sep 27, 2023

Conversation

hi-upchen
Copy link
Contributor

↪️ Pull Request

This pull request addresses an issue where the existing web extension plugin did not recognize the side_panel property in Chrome Extension manifest V3, leading to the HTML files not being compiled and copied to the dist folder. With the recent support for the side_panel property in Google Chrome, this PR introduces the necessary changes to enable the plugin to recognize the property, ensuring proper compilation of the HTML files.

The feature aligns with the latest chrome.sidePanel documentation from Chrome, ensuring compliance with the latest standards.

💻 Examples

For the manifest

{
  "manifest_version": 3,
  "name": "Sample Web Extension",
  "version": "0.0.1",
  "background": {
    "service_worker": "service-worker.ts"
  },
  "action": {
    "default_title": "Click to open panel"
  },
  "side_panel": {
    "default_path": "pages/sidepanel/sidepanel.html"
  },
  "permissions": [
    "sidePanel",
    "tabs"
  ],
  "icons": {
    "16": "assets/images/icon-16.png",
    "48": "assets/images/icon-48.png",
    "128": "assets/images/icon-128.png"
  }
}

Before:
The side_panel is not recognized by the @parcel/config-webextension so that the html is not bring to the dist folder.
image

After
With the update, the HTML file for the side_panel settings is now correctly compiled and included in the dist folder.
image

🚨 Test instructions

Integration tests for the new functionality have been added.

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

Copy link
Member

@mischnic mischnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mischnic mischnic merged commit d386ac1 into parcel-bundler:v2 Sep 27, 2023
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants