我有以下文件夹结构
./components/dashboard/index.tsx
./components/dashboard/users/usertable.tsx我希望在我可以做的地方有一个tsconfig:
import dashboard from '@dashboard'
import usertable from '@dashboard/users/usertable我可以通过设置
"paths": {
"@dashboard":["./components/dashboard"],
}和第二个通过设置
"paths": {
"@dashboard/*":["./components/dashboard/*"],
}但我怎样才能同时得到它们呢?
发布于 2022-09-06 12:24:17
解决方案非常简单--同时设置两条路径:
"paths": {
"@dashboard":["./components/dashboard"],
"@dashboard/*":["./components/dashboard/*"]
}https://stackoverflow.com/questions/73620342
复制相似问题