File an issue about the selected text
Title: Import Maps
Shortname: import-maps
Repository: WICG/import-maps
Inline Github Issues: true
Group: WICG
Status: CG-DRAFT
Level: 1
URL: https://wicg.github.io/import-maps/
Boilerplate: omit conformance, omit feedback-header
Editor: Domenic Denicola, Google https://www.google.com/, d@domenic.me, https://domenic.me/
Abstract: Import maps allow web pages to control the behavior of JavaScript imports.
!Participate: GitHub WICG/import-maps (new issue, open issues)
!Commits: GitHub spec.bs commits
Complain About: accidental-2119 yes, missing-example-ids yes
Indent: 2
Default Biblio Status: current
Markup Shorthands: markdown yes
spec: html; type: dfn; urlPrefix: https://html.spec.whatwg.org/multipage/
  text: module map; for: /; url: webappapis.html#module-map
  text: fetch an import() module script graph; url: webappapis.html#fetch-an-import()-module-script-graph
  text: fetch a modulepreload module script graph; url: webappapis.html#fetch-a-modulepreload-module-script-graph
  text: fetch an inline module script graph; url: webappapis.html#fetch-an-inline-module-script-graph
  text: fetch a single module script; url: webappapis.html#fetch-a-single-module-script
  text: script; url: webappapis.html#concept-script

urlPrefix: https://tc39.github.io/ecma262/#; spec: ECMA-262; type: abstract-op;
  text: IsArray; url: sec-isarray

Definitions

A resolution result is either a [=URL=] or null. A specifier map is an [=ordered map=] from [=strings=] to [=resolution results=]. A dependency cache list is a optimization cache [=list=] of the dependency [=strings=] of a module. A import map is a [=struct=] with three [=struct/items=]: * imports, a [=specifier map=], and * scopes, an [=ordered map=] of [=URLs=] to [=specifier maps=]. * depcache, an [=ordered map=] of [=URLs=] to [=dependency cache lists=]. An empty import map is an [=/import map=] with its [=import map/imports=], [=import map/scopes=] and [=import map/depcache=] all being empty maps.

Acquiring import maps

New members of environment settings objects

Each [=environment settings object=] will get an import map algorithm, which returns an [=/import map=] created by the first `