Keywords introduced by vue-cli using @ absolute path import have no syntax hints in vscode

keywords introduced by vue-cli using @ absolute path import have no syntax hint in vscode, but relative paths are:


both compilation runs are fine. How can vscode recognize the absolute path defined by webpack alias?


Under

vscode, you can add a jsconfig.json file to the project root for configuration.

configuration is as follows:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    },
    "target": "ES6",
    "module": "commonjs",
    "allowSyntheticDefaultImports": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"]
}
Menu