Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tiagoperes opened this issue Aug 6, 2020 · 0 comments · May be fixed by #23
Open

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

Tiagoperes opened this issue Aug 6, 2020 · 0 comments · May be fixed by #23

Comments

@Tiagoperes
Copy link

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(/\/$/, '')) {
@Tiagoperes Tiagoperes linked a pull request Aug 7, 2020 that will close this issue
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 a pull request may close this issue.

1 participant