The rs dev command starts the Rsbuild development server for an application. It compiles the source code in development mode, watches for changes, and applies hot module replacement (HMR) or reloads the page as needed.
rs dev [options]The command loads the application configuration registered with define.app().
rs dev supports the same development server options as Rsbuild. See the Rsbuild CLI documentation for details.
Examples:
# Start the server and open the page in the browser
rs dev --open
# Use port 8080 and fail if it is already in use
rs dev --port 8080 --strict-port
# Make the server available on the local network
rs dev --hostConfigure the development server through define.app() in the Rstack configuration file. It accepts the standard Rsbuild configuration:
import { define } from 'rstack';
define.app({
server: {
open: true,
port: 8080,
},
});