false | 'index'
'index'
Whether to enable HTML fallback.
By default, when the request meets the following conditions and the corresponding resource is not found, it will fallback to index.html
:
GET
or HEAD
requesttext/html
(the request header accept type is text/html
or */*
)export default {
server: {
htmlFallback: 'index',
},
};
If you do not want to enable HTML fallback, you can set server.htmlFallback
to false
.
export default {
server: {
htmlFallback: false,
},
};
If server.htmlFallback
cannot meet your needs, you can use server.historyApiFallback for more flexible settings.