vscode vue项目 选中 跳转到函数定义位置

vscode 常用跳转到函数定义的插件有(path autocomplete),但是对于webpack 中的 定义的alias 中的路径无法识别

vue.config.js

    resolve: {
      alias: {
        '@': resolve('src'),
        api: resolve('src/api'),
        assets: resolve('src/assets'),
        components: resolve('src/components'),
        icons: resolve('src/icons'),
        layout: resolve('src/layout'),
        router: resolve('src/router'),
        store: resolve('src/store'),
        styles: resolve('src/styles'),
        utils: resolve('src/utils'),
        views: resolve('src/views')
      }
    }

jsconfig.json

  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "@/*": ["src/*"],
      "api/": ["src/api/*"],
      "assets/": ["src/assets/*"],
      "components/": ["src/components/*"],
      "icons/": ["src/icons/*"],
      "layout/": ["src/layout/*"],
      "router/": ["src/router/*"],
      "store/": ["src/store/*"],
      "styles/": ["src/styles/*"],
      "utils/": ["src/utils/*"],
      "views/": ["src/views/*"]
    }
  },
  "exclude": ["node_modules", "dist"]

你可能感兴趣的:(js)