1.项目环境:vue3, typescript, javascript
2.问题表现:ctrl+左键,无法跳转到对应文件
import { team } from "/@/store/modules/team";
3.问题原因:typescript项目中,如果混入了javascript,就会导致vscode路径跳转失败
4.解决办法:在tsconfig.json添加配置 allowJs:true ,并重新启动vscode, 配置如下:
{ "compilerOptions": { "allowJs": true, "baseUrl": ".", "paths": { "@/*": [ "src/*" ] } } }
标签:typescript,VScode,路径,vscode,javascript,team,跳转 From: https://www.cnblogs.com/xiaoyuxielikebai/p/17066090.html