|
|
@ -170,7 +170,7 @@ export async function createVitePressPlugin(
|
|
|
|
// serve our index.html after vite history fallback
|
|
|
|
// serve our index.html after vite history fallback
|
|
|
|
return () => {
|
|
|
|
return () => {
|
|
|
|
server.middlewares.use((req, res, next) => {
|
|
|
|
server.middlewares.use((req, res, next) => {
|
|
|
|
if (req.url!.endsWith('.html')) {
|
|
|
|
if (req.url!.replace(/\?.*$/, '').endsWith('.html')) {
|
|
|
|
res.statusCode = 200
|
|
|
|
res.statusCode = 200
|
|
|
|
res.setHeader('Content-Type', 'text/html')
|
|
|
|
res.setHeader('Content-Type', 'text/html')
|
|
|
|
res.end(`
|
|
|
|
res.end(`
|
|
|
|