boolean | string | string[] | undefined
undefined
dev.startUrl
is used to configure a set of page URLs that Rsbuild will automatically open in the browser after starting the server.
You can also use the --open option of Rsbuild CLI to open the pages.
dev.startUrl
can be set to the following values.
http://localhost:<port>
:Since the port number may change, you can use the <port>
placeholder to refer to the current port number, and Rsbuild will automatically replace the placeholder with the actual listening port number.
Rsbuild by default will open the page in the system's default browser.
On macOS, you can open the specified browser when Dev Server starts, by set environment variable BROWSER
, support values:
For example:
You can set BROWSER
in the local .env.local
file, which helps avoid impacting other developers.