Skip to content

Improve path handling for ensure_import_from #72

@morgante

Description

@morgante

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions