Open Bug 1916277 Opened 5 months ago Updated 10 days ago

Support multiple import maps

Categories

(Core :: JavaScript Engine, enhancement, P3)

Firefox 128
enhancement

Tracking

()

People

(Reporter: yoav, Assigned: allstars.chh)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Steps to reproduce:

Import maps currently have to load before any ES module and there can only be a single import map per document. That makes them fragile and potentially slow to use in real-life scenarios: Any module that loads before them breaks the entire app, and in apps with many modules the become a large blocking resource, as the entire map for all possible modules needs to load first.

There's a proposal [1] to enable multiple import maps per document, by merging them in a consistent and deterministic way.

Mozilla standard position - https://github.com/mozilla/standards-positions/issues/1058

[1] https://github.com/whatwg/html/pull/10528

Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Severity: -- → N/A
Priority: -- → P3

Needinfo'ing Yoshi, as he's our expert for Import Maps

Yoshi: Not sure about your GitHub handle but you probably want to take a look at the proposal and give it some thought about implementation challenge.

Blocks: js-lang
Flags: needinfo?(allstars.chh)
Summary: Support dynamic import maps → Support multiple import maps
Assignee: nobody → allstars.chh
Flags: needinfo?(allstars.chh)

The related MDN page already mentions multiple import maps, so there's probably no updated needed for that. Though this should be reflected in the related browser compat data.

Sebastian

Keywords: dev-doc-needed
No longer depends on: 1892199
Depends on: 1945540
You need to log in before you can comment on or make changes to this bug.