Skip to content

Resolve longest match first #13

@thomas-p-wilson

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.

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