We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebe4d1f commit 540c45cCopy full SHA for 540c45c
docs/languages/node.js/npm.md
@@ -29,7 +29,7 @@ import express from 'express'; // 一个 web 服务器模块
29
- 对于指定路径的模块:
30
1. 首先查找该文件,缺省的后缀名按照 `.js`, `.node`, `.json` 的顺序尝试;
31
2. 然后尝试作为文件夹名查找该文件夹下的 `package.json` 并引用其中 `main` 字段指定的文件;
32
- 3. 最后尝试作为文件夹名查找该文件夹下的 `index` 文件,缺省后缀名逻辑与 1. 相同。
+ 3. 最后尝试作为文件夹名查找该文件夹下的 `index` 文件,缺省后缀名逻辑与 c. 相同。
33
- 对于其他没有指定路径的模块,也即通过包管理器安装的模块,会尝试在当前文件夹下的 `node_modules` 文件夹下查找,如果查找失败,则依次从上级文件夹中(可能的) `node_modules` 文件夹下查找。
34
35
### 其他包管理器
0 commit comments