Skip to content

Instantly share code, notes, and snippets.

@apgapg
Created September 14, 2020 05:36
Show Gist options
  • Save apgapg/b1ebb4c945a048fa1c237fab803c1ad7 to your computer and use it in GitHub Desktop.
Save apgapg/b1ebb4c945a048fa1c237fab803c1ad7 to your computer and use it in GitHub Desktop.
Adding path alias in vs code to resolve @ (for src/) in imports
{
"include": [
"./src/**/*"
],
"compilerOptions": {
"baseUrl": "src",
"paths": {
"@/*": [
"./*"
]
}
},
"exclude": [
"node_modules",
"dist"
]
}
@apgapg
Copy link
Author

apgapg commented Sep 14, 2020

For eg.
import { imageUpload } from '@/mixins/imageUpload';
VS code will resolve image upload ie ctrl+click would work

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