You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The slidev:config plugin configures the Vite dev server to load the built-in Vue index page for any request URLs ending with .html. This makes it so Vite cannot be used to serve additional pages that might be used as embedded iframes in a slideshow.
// serve our index.html after vite history fallback
return()=>{
server.middlewares.use(async(req,res,next)=>{
if(req.url!.endsWith('.html')){
res.setHeader('Content-Type','text/html')
res.statusCode=200
res.end(options.utils.indexHtml)
return
}
next()
})
}
},
If a slideshow uses an <iframe> and the URL ends with .html, it will not be loaded by the dev server. A workaround is to use a URL that ends with .htm instead. See below for an example.
Describe the bug
The
slidev:config
plugin configures the Vite dev server to load the built-in Vue index page for any request URLs ending with.html
. This makes it so Vite cannot be used to serve additional pages that might be used as embedded iframes in a slideshow.slidev/packages/slidev/node/vite/extendConfig.ts
Lines 189 to 202 in 3be1191
If a slideshow uses an
<iframe>
and the URL ends with.html
, it will not be loaded by the dev server. A workaround is to use a URL that ends with.htm
instead. See below for an example.Minimal reproduction
Steps to reproduce the behavior:
.htm
instead of.html
Environment
The text was updated successfully, but these errors were encountered: