For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/configure/app/output/override-browserslist.md.
  • 简体中文
  • output.overrideBrowserslist

    • 类型: string[] | undefined
    • 默认值:
    const defaultBrowserListMap: Record<RsbuildTarget, string[]> = {
      web: ['chrome >= 87', 'edge >= 88', 'firefox >= 78', 'safari >= 14'],
      node: ['node >= 14'],
      'web-worker': ['chrome >= 87', 'edge >= 88', 'firefox >= 78', 'safari >= 14'],
    };

    指定项目兼容的目标浏览器范围。

    该值会被 SWC 和 autoprefixer 用来确定需要转换的 JavaScript 语法特性和需要添加的 CSS 浏览器前缀。

    其他配置方式和配置优先级请参考 Browserslist 配置。

    Info

    该配置项的使用方式与 Rsbuild 完全一致。详细信息请参考 Rsbuild - output.overrideBrowserslist。