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
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
proxy
publicDir
strictPort

tools

autoprefixer
bundlerChain
cssLoader
htmlPlugin
less
postcss
rspack
sass
styleLoader

performance

bundleAnalyze
chunkSplit
dnsPrefetch
preconnect
prefetch
preload
printFileSize
profile
removeConsole
removeMomentLocale

htmlFallback#

  • Type: false | 'index'
  • Default: 'index'

Whether to support html fallback. By default, when the request meets the following conditions and the corresponding resource is not found, it will fallback to index.html:

  • The request is a GET or HEAD request
  • Which accepts text/html (the request header accept type is text/html or */*)
export default {
  server: {
    htmlFallback: 'index',
  },
};
TIP

When htmlFallback cannot meet your needs, you can use server.historyApiFallback for more flexible settings.

Edit this page on GitHub
Previous Pagehost
Next pagehttps
ON THIS PAGE