html.title
- Type:
string | Function - Default:
'Rsbuild App'
Set the title tag of the HTML page.
Tip
If the HTML template used in the current project already includes the <title> tag, the html.title will not take effect.
String usage
html.title can be directly set as a string:
rsbuild.config.ts
The title tag generated in HTML will be:
Function usage
- Type:
When html.title is of type Function, the function receives an object as the argument, and the object's values include:
value: the default title configuration of Rsbuild.entryName: the name of the current entry.
In the MPA (multi-page application) scenario, you can return different title strings based on the entry name, thus generating different title tags for each page:
rsbuild.config.ts
Unset <title> tag
When html.title is set to an empty string, Rsbuild will not inject the <title> tag:
rsbuild.config.ts

