Skip to content

Add wildcard module matching#64

Open
anx00 wants to merge 1 commit into
cfware:masterfrom
anx00:bounty-17-wildcard-modules
Open

Add wildcard module matching#64
anx00 wants to merge 1 commit into
cfware:masterfrom
anx00:bounty-17-wildcard-modules

Conversation

@anx00
Copy link
Copy Markdown

@anx00 anx00 commented May 12, 2026

Fixes #17.

Summary

  • Adds modules: { "*": [...] } as a wildcard fallback for matching configured named exports from any import or require source.
  • Applies the wildcard to relative imports as well, so re-export helper modules can be covered without enumerating every module path.
  • Documents the wildcard configuration and adds fixture coverage for HTML and CSS tags imported from arbitrary sources.

Validation

  • npm install
  • node - targeted fixture check for fixtures/wildcard-modules-source.js -> fixtures/wildcard-modules.js (wildcard fixture matched)
  • git diff --check
  • npm run tests-only was run. The new wildcard modules test passed; the run still fails on the existing transform-template-literals after fixture because the current Babel dependency output differs from the old checked-in fixture.
  • npm test was run. It fails in xo before tests because an old lint dependency calls util.isDate, which is no longer available in this Node version.

Notes

This keeps exact module entries ahead of the wildcard entry, so existing explicit module configuration remains the stricter match when present.

IssueHunt

This addresses the IssueHunt-funded issue for #17. If IssueHunt does not auto-link the PR, I will submit this PR through the IssueHunt issue page as the bounty platform requires.

AI assistance disclosure

This PR was prepared with AI assistance and manually reviewed before submission. The change is scoped to the issue requirements and validated with the checks listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minify all templates tagged with a certain tag

1 participant