Skip to content

fix: apply module path transform to all modules - #3

Merged
break-stuff merged 1 commit into
mainfrom
fix/apply-path-transform-to-all-modules
Jul 30, 2026
Merged

break-stuff merged 1 commit into
mainfrom
fix/apply-path-transform-to-all-modules

Conversation

@break-stuff

Copy link
Copy Markdown
Contributor

Fixes #2

Problem

The modulePathTemplate transform was only applied to modules containing custom element declarations (if (ces.length)). Barrel/index files, utility modules, or any module without a customElement declaration were completely skipped — their path, exports[*].declaration.module, and other nested module references remained untransformed.

Changes

  • Moved modulePathTemplate application outside the ces.length gate so it runs on every module in the manifest
  • Added updateModuleReferences which recursively walks declarations and exports, applying modulePathTemplate to any nested module key
  • Kept definitionPathTemplate and typeDefinitionPathTemplate gated to CE modules (they are CE-specific)
  • Made name/tagName parameters optional in the callback types to reflect that non-CE modules won't have them

Verification

  • All existing tests pass
  • Build and lint pass

@break-stuff
break-stuff merged commit 561f191 into main Jul 30, 2026
2 checks passed
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.

Missing module path transform

1 participant