Skip to content

Commit

Permalink
fix: do not override user-provided html files
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Nov 1, 2024
1 parent 3be1191 commit 78cadad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/slidev/node/vite/extendConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export function createConfigPlugin(options: ResolvedSlidevOptions): Plugin {
// serve our index.html after vite history fallback
return () => {
server.middlewares.use(async (req, res, next) => {
if (req.url!.endsWith('.html')) {
if (req.url === '/index.html') {
res.setHeader('Content-Type', 'text/html')
res.statusCode = 200
res.end(options.utils.indexHtml)
Expand Down

0 comments on commit 78cadad

Please sign in to comment.