Resolve longest match first · Issue #13 · ilearnio/module-alias · GitHub
Skip to content

Resolve longest match first #13

Closed
Closed

Description

@thomas-p-wilson

Given:

moduleAlias.addAliases({
    "react-dom": "preact-compat-enzyme",
    "react-dom/server": "preact-render-to-string"
});

An attempt to require('react-dom/server') yields Error: Cannot find module 'preact-compat-enzyme/server'.

I believe the simple solution would be to evaluate possible matches, and choose the longest.

Activity

  1. added a commit that references this issue on Jul 28, 2017
    c47e3cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions