Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] monorepoRedirect 自动添加子包的 tsconfig.paths 别名 #12485

Open
fz6m opened this issue Jun 22, 2024 · 0 comments
Open

Comments

@fz6m
Copy link
Member

fz6m commented Jun 22, 2024

说明

目前 monorepoRedirect 功能只会做 alias 重定位源码位置到对应子包的 src/* (根据用户更改可能不同),但是类型会默认指到对应子包的 package.json#types 去,这往往在 dist 中,而开发时,对应子包如果修改了内容,往往不会更新 dist 的内容,所以就需要将 tsconfig 的 paths 指到对应的 src/* 去,确保类型总是最新的。

做法:使用 modifyTSConfig api 添加对应子包的 paths ,参考:

  "@example/lib": ["/path/to/lib/src"],
  "@example/lib/*": ["/path/to/lib/src/*"],
@fz6m fz6m changed the title [Feature Request] monorepoRedirect 支持添加对应子包的 tsconfig.paths 别名 [Feature Request] monorepoRedirect 自动添加子包的 tsconfig.paths 别名 Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant