导入映射


¥Import maps

前面的两个示例定义了 load 钩子。这是 resolve 钩子的示例。这个钩子模块读取一个 import-map.json 文件,该文件定义了要覆盖其他 URL 的说明符(这是 "导入映射" 规范的一小部分的非常简单的实现)。

¥The previous two examples defined load hooks. This is an example of a resolve hook. This hooks module reads an import-map.json file that defines which specifiers to override to other URLs (this is a very simplistic implementation of a small subset of the "import maps" specification).