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

很多地方ts会有提示 是需要配置什么吗? #7

Open
pangxzi opened this issue Apr 23, 2023 · 4 comments
Open

很多地方ts会有提示 是需要配置什么吗? #7

pangxzi opened this issue Apr 23, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@pangxzi
Copy link

pangxzi commented Apr 23, 2023

image

@jeryqwq
Copy link
Owner

jeryqwq commented Apr 23, 2023

  1. 如果是相关packages下面的包ts报错,可以使用npm run build-lib打包下相关包,就能生成ts类型文件。
  2. 可以提供你的ts版本吗,可能是版本太旧了,具体看这里
    image

@pangxzi
Copy link
Author

pangxzi commented Apr 24, 2023

  1. 如果是相关packages下面的包ts报错,可以使用npm run build-lib打包下相关包,就能生成ts类型文件。
  2. 可以提供你的ts版本吗,可能是版本太旧了,具体看这里
    image

1.执行pnpm build-lib

image

image

3.就是packages下面的包必须打包才可以在项目中使用吗?可以直接使用吗?

@jeryqwq
Copy link
Owner

jeryqwq commented Apr 24, 2023

@mwj610

  1. 第一个问题可以参考下相关搜索平台的答案,window平台我这边无法复线,也欢迎pr不知道这个行不行
    3,packages使用是可以不用打包的,但是ts类型适配是需要打包(可能是因为我对ts的配置还不够深入),因为前期的代码改动都比较大,所以支持了package的热更新,packages稳定后正常应该需要打包后再使用,否则违反了monorepo原则,包很多的情况下会卡顿,把umi里配置的alias删除即可关闭packages的热更新。

jeryqwq added a commit that referenced this issue Apr 24, 2023
@pangxzi
Copy link
Author

pangxzi commented Apr 24, 2023

@mwj610

  1. 第一个问题可以参考下相关搜索平台的答案,window平台我这边无法复线,也欢迎pr不知道这个行不行
    3,packages使用是可以不用打包的,但是ts类型适配是需要打包(可能是因为我对ts的配置还不够深入),因为前期的代码改动都比较大,所以支持了package的热更新,packages稳定后正常应该需要打包后再使用,否则违反了monorepo原则,包很多的情况下会卡顿,把umi里配置的alias删除即可

👌

@jeryqwq jeryqwq added the bug Something isn't working label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants