Skip to content

feat: Add apply option to addWxtPlugin to filter which endpoint plugin load - #2613

Open
fkatsuhiro wants to merge 2 commits into
wxt-dev:mainfrom
fkatsuhiro:feat/issue-1627
Open

fkatsuhiro wants to merge 2 commits into
wxt-dev:mainfrom
fkatsuhiro:feat/issue-1627

Conversation

@fkatsuhiro

Copy link
Copy Markdown
Contributor

Overview

By embedding the entrypoint identifier as a query parameter (?entrypoint=<name>) into the virtual module ID, the entrypoint is determined dynamically upon module resolution. Each plugin's apply hook is then evaluated using the extracted entrypoint to generate code containing only the matching plugins.

Manual Testing

Prepare file which use addWxtPlugin and specify 'background' entry point. After it, run build and this commant under /packages/qwxt-demo directory grep -rl "test-plugin" .output/chrome-mv3. This result confirms that the build process run with the specifiled entrypoint.

Before implementation

image

After implentation

image

Related Issue

This PR closes #1627

@netlify

netlify Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit f9650aa
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6aa1df2f31f167000810dced
😎 Deploy Preview https://deploy-preview-2613--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added pkg/analytics Includes changes to the `packages/analytics` directory pkg/wxt Includes changes to the `packages/wxt` directory labels Sep 6, 2026
@fkatsuhiro
fkatsuhiro marked this pull request as ready for review September 9, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/analytics Includes changes to the `packages/analytics` directory pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Module API] Filter which entrypoints plugins run in

1 participant