【发布时间】:2019-03-05 10:22:02
【问题描述】:
如何从范围内的导入包中导入子目录或文件?
例如我完全可以做到:
import array from "lodash/array".
但是,一旦我的包被限定了范围,array.js 文件(或array/index.js)就变得不可用,因为以下将不起作用:
import array from "@myscope/lodash/array"
【问题讨论】:
-
它应该可以工作。例如,您可以检查@angular/common/http。它不起作用的原因是特定于您的叉子的。您可能会错误地构建它,否则。
-
@estus 感谢您的提示。不过,这与我的包含项目结构或配置无关。
标签: node.js npm import scope node-modules