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

# output.polyfill

- **类型：** `'entry' | 'usage' | 'ua' | 'off'`
- **默认值：** `'entry'`

通过 `output.polyfill` 你可以配置 Polyfill 的注入方式。

Modern.js 还支持了基于浏览器 [UA](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/User-Agent) 信息的运行时按需 Polyfill 方案，具体使用姿势可查看 [运行时按需 Polyfill](/zh/guides/advanced-features/compatibility.md#运行时按需-polyfill)

:::info
该配置项的使用方式与 Rsbuild 完全一致。详细信息请参考 [Rsbuild - output.polyfill](https://v2.rsbuild.dev/zh/config/output/polyfill)。
:::