问题描述
js 文件
import * as THREE from "three";
ctrl + 点击 three
跳转到的文件为
C:\Users\21632\AppData\Local\Microsoft\TypeScript\5.2\node_modules\@types\three\
下的文件。
而不是项目中根目录下的 .\node_modules\three\build\three.js
。
参考
- 为什么npm包从/AppData解析,而不是本地/node_modules解析?
- vscode - IntelliSense is not working for external libraries