美文网首页
VsCode识别@别名插件,函数能在@别名下跳转

VsCode识别@别名插件,函数能在@别名下跳转

作者: ShindouHiro | 来源:发表于2019-11-08 07:38 被阅读0次
  • 安装插件Path Intellisense

  • 在setting.json添加

{
    "path-intellisense.mappings": {
        "@": "${workspaceRoot}/src"
      } 
}

  • 在package.json 添加jsconfig.json
{
  "compilerOptions": {
      "target": "ES6",
      "module": "commonjs",
      "allowSyntheticDefaultImports": true,
      "baseUrl": "./",
      "paths": {
        "@/*": ["src/*"]
      }
  },
  "exclude": [
      "node_modules"
  ]
}

相关文章

网友评论

      本文标题:VsCode识别@别名插件,函数能在@别名下跳转

      本文链接:https://www.haomeiwen.com/subject/wgimbctx.html