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

Improve path handling for ensure_import_from #72

Open
morgante opened this issue Jan 21, 2024 · 0 comments
Open

Improve path handling for ensure_import_from #72

morgante opened this issue Jan 21, 2024 · 0 comments

Comments

@morgante
Copy link
Contributor

If I pass a path instead of a module name to ensure_import_from then it frequently fails to find the right location.

We should be able to use absolute path and relativizing to construct the right relative path to ensure an import from within my repo.

Ex.

`foo` as $mod where {
  $mod <: ensure_import_from(`'./utils/foo')
}

If I run this on apps/my.js it should insert the import as ../utils/foo.

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

No branches or pull requests

1 participant