Skip to content

vite配置完 @ 引入路径后,ts检验会报错,请问一下怎么解决 #2226

Answered by OneMoreJack
lwm98 asked this question in Q&A
Discussion options

You must be logged in to vote

需要在 tsconfig.json 里配置 baseUrlpaths

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": [ "src/*" ]
    }
  }
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lwm98
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants