DEP0151: 主索引查找和扩展搜索


类型: 仅文档(支持 --pending-deprecation

以前,index.js 和扩展搜索查找将适用于 import 'pkg' 主入口点解析,即使在解析 ES 模块时也是如此。

有了这个弃用,所有 ES 模块主入口点解析都需要明确的 "exports""main" 入口并带有确切的文件扩展名。

Type: Documentation-only (supports --pending-deprecation)

Previously, index.js and extension searching lookups would apply to import 'pkg' main entry point resolution, even when resolving ES modules.

With this deprecation, all ES module main entry point resolutions require an explicit "exports" or "main" entry with the exact file extension.