Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Is URL mapping still necessary? #198

@guybedford

Description

@guybedford

The original argument for supporting mapping of URLs was to enable polyfill workflows where https://path/to/builtin-polyfill.js could be mapped to the builtin with a fallback.

The reason this was necessary was to support both browsers without import maps support and browsers with import maps support for builtin shimming.

With the newer timelines we are likely looking at import maps shipping quite a while before builtins ship, in which case this constraint no longer applies.

Since this constraint that initially pushed for URL mapping is no longer there, do we still need to support URL mapping?

The alternative is to just support bare specifiers in import maps.

Personally I prefer this for consistency of resolution and in knowing that eg import(await import.meta.resolve('pkg')) is always well-defined, instead of possibly resolving differently to import 'pkg'.

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