Skip to content

Conversation

@deyihu
Copy link
Collaborator

@deyihu deyihu commented Nov 3, 2025

fix #2686

"src/**/*.ts",
"src/**/*.json"
"dist/",
"src/"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src是不是没有打包进去的必要?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dts-bundle-generator 是不是可以彻底移除掉了?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. src发到npm方便有的用户可能需要看源码,或者有时候用户希望引用包的部分功能,例如
import {x} from 'maptalks/src/xxx'

注意maptalks不是所有的工具都有export的,有些工具可能就需要这种引入方式

  1. dts bundle的目的不是用在vscode这种环境下的,这个是为浏览器准备,后续maptalks会做playground,这个playground里会需要dts的,考虑到网络请求数量的问题,这时将所有的dts打包就必要了,否则那么多dts无限引入和嵌套,网络请求量太大了且还要各种依赖分析的

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解,感谢解惑👌

"src/**/*.ts",
"src/**/*.json"
"dist/",
"src/"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解,感谢解惑👌

@deyihu deyihu requested a review from fuzhenn November 6, 2025 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

关于TS类型的导出方式?

2 participants