Dear friends, if you also use @ in the vue3+ts+vite project and report an error: If the module cannot be found, as shown in the picture below, don’t worry, don’t be afraid, I will teach you to solve it in two steps!
1. Find the tsconfig.json file
2. Add the following code
code show as below:
"compilerOptions": {
// ...省略其它配置项
"baseUrl": ".",
"paths": {
"@/*": [ "src/*" ]
}
}
Well, in the end, if it is helpful to you, please move your little hand to make a fortune, and give me a little like!