特性


【Features】

默认解析器具有以下属性:

【The default resolver has the following properties:】

  • 基于文件 URL 的解析,如 ES 模块所使用
  • 相对和绝对 URL 解析
  • 没有默认扩展
  • 没有主文件夹
  • 通过 node_modules 进行裸指定符包解析查找
  • 不会因未知的扩展或协议而失败
  • 可以选择在加载阶段提供格式提示

默认加载器具有以下属性

【The default loader has the following properties】

  • 通过 node: URL 支持内置模块加载
  • 通过 data: URL 支持“内联”模块加载
  • 支持 file: 模块加载
  • 在任何其他 URL 协议上都会失败
  • 在加载 file: 时对未知扩展名失败(仅支持 .cjs.js.mjs