boolean | ConnectHistoryApiFallbackOptions
false
When Rsbuild's default page routing behavior cannot meet your needs, for example, if you want to be able to access main.html
when accessing /
, you can set it up using server.historyApiFallback
.
Set historyApiFallback.index
to main.html
, then main.html
can be accessed when accessing /
or other routes that would otherwise 404.
When your application contains multiple entries, you may want different visits to fallback to different pages. At this point, you can set more complex rules via the rewrites
option:
For more options and information, see the connect-history-api-fallback documentation.