The content of this section is derived from the content of the following links and is subject to the CC BY 4.0 license.
The following contents can be assumed to be the result of modifications and deletions based on the original contents if not specifically stated.
Used for developing applications.
Objectstring | string[] | 'all' | 'auto''auto'Allow access to devServer's whitelist.
Object'log' | 'info' | 'warn' | 'error' | 'none' | 'verbose''info'The client's log level.
boolean | ObjecttrueWhether to report errors on the client's screen when a compilation error occurs.
booleantrueWhether or not to show the progress of compilation on the client.
boolean | numbertrueThe number of times the development server will reconnect to the client. true means unlimited number of times.
'ws' | 'sockjs'wsThe transfer method between the client and the development server.
string | object{}URL of the ws server.
booleantrueWhether to enable gzip compression.
object{}Control the behavior of the rspack-dev-middleware.
array | function | objectundefinedAdd response headers.
boolean | objectfalseUnderhanded logic when a 404 page is requested.
'local-ip' | 'local-ipv4' | 'local-ipv6' | string'local-ip'The address of the development server.
booleantrueWhether to enable hot updates.
booleantrueWhether or not to reload the page. This configuration item is turned off when hot is turned on.
booleantrueWhether the path corresponds to the product one by one.
functionCallback when devServer establishes a connection to the port.
boolean | string | object | [string, object]trueWhether to open the browser when devServer starts.
'auto' | string | number[]Used to configure the port number.
object | [object, function]Configure proxy, can be used to solve cross-domain issues, etc.
'http' | 'https' | 'spdy' | string | object'http'Configuration items for the server.
function (middlewares, devServer)Custom middleware.
boolean | string | object | [string, object]Used to configure whether to enable static servers from some directories (default is 'public').
string | object | [string, object]Listens for changes to a series of files.
false | 'sockjs' | 'ws'Used to configure the type of web socket server.