Skip to content

fix(flow-config-parser): support module.name_mapper.extension remap#297

Open
ncthuc2004 wants to merge 1 commit into
gajus:masterfrom
ncthuc2004:issuehunt-27-js-flow-resolution
Open

fix(flow-config-parser): support module.name_mapper.extension remap#297
ncthuc2004 wants to merge 1 commit into
gajus:masterfrom
ncthuc2004:issuehunt-27-js-flow-resolution

Conversation

@ncthuc2004
Copy link
Copy Markdown

@ncthuc2004 ncthuc2004 commented May 15, 2026

Summary

  • add first-class support for module.name_mapper.extension in flow-config-parser
  • convert extension shorthand into regex-based remappers so imports like icons/check.png can be redirected predictably
  • apply extension remappers in remapModule() after explicit module.name_mapper rules
  • add tests that verify both css and png extension remap behavior

Why

Issue #27 is about type imports not resolving to expected .js.flow style definitions. This patch improves module remapping parity with Flow config shorthand so type-import rewrites can reliably target definition files.

Validation

  • updated packages/flow-config-parser/src/__tests__/flowConfigParser.test.js
  • parser behavior now remaps extension-based imports through config shorthand

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


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.

1 participant