> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# output.legalComments

> `optional` **legalComments?**: `"none"` | `"inline"` | `"linked"`

:::info Lynx 默认值覆盖
此项是 Rsbuild 配置，`pluginLynx` 覆盖了它的默认值。下方默认值指应用插件后的值。请在 `rsbuild.config.ts` 顶层配置，显式设置的值优先。

[完整行为见 Rsbuild 配置参考](https://rsbuild.rs/zh/config/output/legal-comments)。
:::

[Output.legalComments](/next/zh/api/packages/rspeedy/interfaces/Output.md#legalcomments) 用于控制如何处理法律注释（legal comment）。

## Default Value

`'none'`

## Remarks

这与 Rsbuild 不同，因为我们通常不希望 Lynx 产物中出现 `.LEGAL.txt` 文件。

可以通过以下选项之一配置该行为：

- `linked`：将所有法律注释提取到 `.LEGAL.txt` 文件中，并通过注释链接到该文件。

- `inline`：将所有法律注释保留在原位置。

- `none`：移除所有法律注释。
