Skip to content

Support for Import MapsΒ #61325

@harrysolovay

Description

@harrysolovay

πŸ” Search Terms

import, map, path, alias, scope

βœ… Viability Checklist

⭐ Suggestion

I'm curious to hear thoughts on introducing an importMap option in compilerOptions.

Some initial thoughts:

  • Import maps are a WICG standard.
  • They can effectively replace paths for most use cases.
  • They're supported by Deno.
  • Projects with colocated Node and Deno workspaces could leverage the same source of truth regarding imports/aliases.
  • Import maps provide the ability to configure scopes (extremely useful in my experience)

πŸ“ƒ Motivating Example

Every project that utilizes import maps.

πŸ’» Use Cases

  1. What do you want to use this for?

Simplifying my configuration in projects that contain both Node and Deno workspaces.

  1. What shortcomings exist with current approaches?

One needs to re-specify their aliases in numerous places.

  1. What workarounds are you using in the meantime?

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions