Q:

In VSCode intellisense is broken when using @ in import statement

I'm using VSCode to develop an app with VueJs, but intellisense is broken and not working if I imported modules like this:
import myModule from '@/path/to/myModule.js'

But when I import it like this the intellisense will work:  
import myModule from './path/to/myModule.js'

This happens in *.js file or *.vue file.
What is the reason and is there a fix for it?

A:

You must use paths in a jsconfig.json to let VS Code's tooling know how to resolve that style of paths.
At the root of your project, try creating a jsconfig.json with the contents:
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
       "@/*": [ "root/path/to/src/*" ]
    }
  },
   "exclude": [
     "node_modules"
  ]
}

You can configure @/ to resolve to whatever subdirectory you want in your workspace. Use: "@/*": [ "./*" ] to resolve it to root of your workspace

