server.host
- Type:
string | boolean - Default:
localhost
Specify the host that the Rsbuild server listens to.
By default, the Rsbuild server listens on localhost. You can configure it in the following ways:
string: specify a hostname or IP address to listen on.true: equals to0.0.0.0, listen on all IPv4 interfaces.false: equals tolocalhost.
All IPv4 interfaces
To listen to all IPv4 network interfaces (including public network addresses), set it to 0.0.0.0 or true:
rsbuild.config.ts
Alternatively, you can use the --host CLI flag to enable network access on demand:
Tip
The priority of --host CLI option is higher than server.host.
IPv6 Support
If you want the Rsbuild server to listen all IPv6 network interfaces, you can set it to:
rsbuild.config.ts
If you want the Rsbuild server to listen a specified IPv6 host, you can set it to:
rsbuild.config.ts
At this point, you can access the page via http://[::1]:3000/.

