wxt-dev / wxt-dev/wxt

[Module API] Filter which entrypoints plugins run in

Open
#1,627 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10.5k
Forks
564
PR merge metrics
No merged PRs in 30d

Description

Feature Request

Add a way to filter which entrypoints plugins are added to.

Specifically, modify the addWxtPlugin function like so:

export default defineWxtModule((wxt) => {
  addWxtPlugin(
    wxt,
    "wxt-module-analytics/client-plugin", 
    (entry /* or `group` */) => {
      return true
    },
  );
});

The third parameter should be optional and default to the current behavior of running the plugin in all entrypoints.

Is your feature request related to a bug?

If so, add a link here. If not, write "N/A"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the addWxtPlugin implementation and its Module API reference, especially how plugin entrypoints are currently selected. Trace the existing all-entrypoints behavior, then verify that an omitted third parameter preserves it while a predicate filters the selected entrypoints as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.