You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
让 monorepo 的使用更加丝滑
全局的 TypeScript 类型
TypeScript 跳转
在开发模式下,经常会用到 Go To Definition 这个功能,但是对于 package 下的 library,它们虽然是用 TS 写的,但是实际中项目引用的是
tsc -w
产生的 JS 文件,所以即使开了declaration: true
,也只能跳转到对应 TS 文件产生的 d.ts 上。**解决方法:**使用 tsconfig 的 paths,
将 package 名直接映射给对应包的 index.tsx 文件,这其中有两个点需要注意
https://medium.com/@NiGhTTraX/how-to-set-up-a-typescript-monorepo-with-lerna-c6acda7d4559
The text was updated successfully, but these errors were encountered: