Skip to content

Instantly share code, notes, and snippets.

@Edmund1645
Last active May 25, 2020 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Edmund1645/3f36d9cb844f5a75ae59bfb561b926e2 to your computer and use it in GitHub Desktop.
Save Edmund1645/3f36d9cb844f5a75ae59bfb561b926e2 to your computer and use it in GitHub Desktop.
jsconfig.json files to add webpack aliases imports intellisense to VSCode for Nuxt and Vue.js projects
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./*"],
"@/*": ["./*"],
"~~/*": ["./*"],
"@@/*": ["./*"]
}
},
"exclude": ["node_modules", ".nuxt", "dist"]
}
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
}
},
"exclude": ["node_modules", "dist"]
}
@Edmund1645
Copy link
Author

Edmund1645 commented May 25, 2020

The two files above help provide support for intellisense in VScode when importing absolute modules using webpack imports

  • The first file is for a Nuxt.js project
  • The second is for a Vue.js project.

Be sure to rename the file you wish to use to jsconfig.json

Thanks to Louis-Marie Michelin for writing about it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment