/*
Create a jsconfig.json in the root of your project
then add the following code snippet.
use replace "src" with "." if you are using NextJS
*/
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
{
"paths": {
"@/*": ["src/*"]
}
// ...
}
// vite.config.ts
{
resolve: {
alias: [{ find: '@', replacement: '/src' }],
},
// ...
}
// then you'd import like this
import Image from @assets/image.png