Well this would not work and components will not be resolved. Components are in your src folder. But the compilation is done in the root folder. You need to change it.
src
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/components/*": ["/src/components/*"] } } }
Or by changing the baseUrl
{ "compilerOptions": { "baseUrl": "./src/", "paths": { "@/components/*": ["/components/*"] } } }
His approach worked fine for me. Your second approach of changing the baseUrl also worked fine. But your first approach didn't work.
I think his solution will work for him since his component folder is directly under the root folder.
component
root
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Well this would not work and components will not be resolved.
Components are in your
src
folder. But the compilation is done in the root folder. You need to change it.Or by changing the baseUrl
His approach worked fine for me. Your second approach of changing the baseUrl also worked fine. But your first approach didn't work.
I think his solution will work for him since his
component
folder is directly under theroot
folder.