> 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.sourceMap

> `optional` **sourceMap?**: `boolean` | [`SourceMap`](/next/zh/api/packages/rspeedy/interfaces/SourceMap.md)

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

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

[SourceMap](/next/zh/api/packages/rspeedy/interfaces/SourceMap.md) 用于配置是否为产物生成 source map，以及如何生成。

## Default Value

在 Lynx 构建中未设置该选项时，JavaScript source map 在开发环境使用 `'cheap-module-source-map'`，在生产环境使用 `'source-map'`；同时也会生成 CSS source map。所有 `.map` 资源都会在输出前被移除。
