logo
Guide
Config
Plugin
API
English
简体中文
GitHub
Twitter
Discord
Guide
Config
Plugin
API
English
简体中文
GitHub
Twitter
Discord
logo
Overview
plugins

dev

assetPrefix
beforeStartUrl
client
hmr
liveReload
progressBar
setupMiddlewares
startUrl
writeToDisk

source

aliasStrategy
alias
define
entry
exclude
include
preEntry
transformImport

output

assetPrefix
charset
cleanDistPath
copy
cssModules
dataUriLimit
disableFilenameHash
disableMinimize
distPath
externals
filename
injectStyles
inlineScripts
inlineStyles
legalComments
overrideBrowserslist
polyfill
sourceMap
targets

html

appIcon
crossorigin
favicon
inject
meta
mountId
outputStructure
scriptLoading
tags
templateParameters
template
title

server

compress
headers
historyApiFallback
host
htmlFallback
https
port
printUrls
proxy
publicDir
strictPort

tools

autoprefixer
bundlerChain
cssLoader
htmlPlugin
less
postcss
rspack
sass
styleLoader

performance

bundleAnalyze
chunkSplit
dnsPrefetch
preconnect
prefetch
preload
printFileSize
profile
removeConsole
removeMomentLocale

host#

  • Type: string
  • Default: 0.0.0.0

Specify the host that the Rsbuild Server listens to.

By default, the Rsbuild Server will listen to 0.0.0.0, which means listening to all network interfaces, including localhost and public network addresses.

You can use server.host or the --host CLI param to set the host (The priority of --host option is higher than server.host).

If you want the Rsbuild Server to listen only on localhost, you can set it to:

export default {
  server: {
    host: 'localhost',
  },
};
Edit this page on GitHub
Previous PagehistoryApiFallback
Next pagehtmlFallback
ON THIS PAGE