import map
A JSON block in a page that tells the browser which URL to load when code imports a bare name such as 'lodash'.
In more detail
Written as <script type="importmap">, it maps module names to files so modules can be used without a build step. It must appear before any module script that depends on it.
Related terms
- ES module — A JavaScript file that uses import and export to share code with other files, loaded in the browser with <script type="module">.
- script element — The HTML element that loads or contains JavaScript for the page.
Taught in
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform