number
3000
Specify a port number for Rsbuild Server to listen.
By default, Rsbuild Server listens on port 3000
and automatically increments the port number when the port is occupied. If you enable the server.strictPort config, Rsbuild Server will throw an error instead of incrementing the port number when the port is occupied.
Rsbuild CLI provides the --port option to set the port number, and the --port
option has higher priority than server.port
config.
Set the port to 8080
:
Set different port numbers for development and preview servers: