Skip to content

[Discussion] 是否考虑移除 tsconfig 中的 "removeComments": true 配置 #253

@imsunhao

Description

@imsunhao

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 供参考:

#252

主要改动如下:

// "removeComments": true,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions