We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
本文为博客迁移过来,原文链接: vscode项目alias设置:2020-5-13
一般我们在会在webpack配alias,比如 { '@': path.resolve(__diranme, './src') }
{ '@': path.resolve(__diranme, './src') }
如果在项目上直接这么写,vscode是跳不到目标文件,比如import router from '@/router'。
import router from '@/router'
所以可以在vscode上加一个配置用来让vscode识别这些。
如果项目上用的是 ts ,则配 tsconfig.json,js 则在项目根目录上新建 jsconfig.json
tsconfig.json
jsconfig.json
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } }, "exclude": ["node_modules"] }
更多配置看官网
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一般我们在会在webpack配alias,比如
{ '@': path.resolve(__diranme, './src') }
如果在项目上直接这么写,vscode是跳不到目标文件,比如
import router from '@/router'
。所以可以在vscode上加一个配置用来让vscode识别这些。
如果项目上用的是 ts ,则配
tsconfig.json
,js 则在项目根目录上新建jsconfig.json
更多配置看官网
The text was updated successfully, but these errors were encountered: