html.meta

  • 类型: Object | Function
  • 默认值: undefined

配置 HTML 页面的 <meta> 标签。

示例

meta 对象的 value 为字符串时,会自动将对象的 key 映射为 namevalue 映射为 content

比如设置 description

export default {
  html: {
    meta: {
      description: 'a description of the page',
    },
  },
};

最终在 HTML 中生成的 meta 标签为:

<meta name="description" content="a description of the page" />

详细用法可参考 Rsbuild - html.meta

ON THIS PAGE