Skip to content

It doesn't work when using the alias as the root of the import #22

@Tiagoperes

Description

@Tiagoperes

require("alias/file") works fine, but if you have an index file under the alias and reference only require("alias"), it doesn't work. Imports to the root of an alias never gets replaced.

From what I see, this project has been abandoned, if anyone goes through the same problem, you need to replace the line 105 in this file for:

if (modulePath.startsWith(prefix) || modulePath === prefix.replace(/\/$/, '')) {

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