更新时间:2022-06-18 22:55:30
很遗憾,我在文档中找不到任何内容.因此,在尝试解析绝对路径的导入时,我跟踪了由编译器(TypeScript 2.5.2)执行的文件系统访问.
Unfortunately I couldn't find anything on that in the docs. So I traced the file system accesses performed by the compiler (TypeScript 2.5.2) when trying to resolve an import of an absolute path.
结果是 /
始终引用文件系统根目录.不管compilerOptions
(例如rootDir
,rootDirs
或baseUrl
).
The result is that /
always refers to the file system root. Regardless of compilerOptions
like rootDir
, rootDirs
or baseUrl
.