[Discussion] 是否考虑移除 tsconfig 中的 "removeComments": true 配置
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 43
- Forks
- 11
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
What problem does this feature solve?
目前在构建 vutils 包时,tsconfig.json 中启用了 "removeComments": true,
导致编译输出的 JS 文件中所有注释(包括函数、类型说明)都会被移除。
在我们调试和排查 vutils 内部实现时,这会降低可读性,也不利于其他依赖该包的开发者理解 API 行为。
我在本地测试过将 "removeComments" 注释掉,编译输出正常,功能不受影响,但注释会被保留下来。
这对阅读和调试帮助很大。
因此想和维护者讨论下:
- 是否有必要继续保留
"removeComments": true?
What does the proposed API look like?
我已经创建了一个相关的 PR 供参考:
https://github.com/VisActor/VUtil/pull/252
主要改动如下:
// "removeComments": true,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the vutils package's tsconfig.json and review the existing "removeComments": true setting. Compare the generated output with and without that setting, then inspect PR #252 for the proposed change. Done means deciding whether comments should remain in compiled JavaScript and documenting or applying the maintainers' decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100