Divyansh Singh 6 months ago
parent 266c754de4
commit e87fce07c3

@ -138,7 +138,9 @@ function newRouter(): Router {
// in prod this is handled in src/client/app/utils.ts#pathToFile
const url = new URL(pageFilePath!, 'http://a.com')
const path =
(url.pathname.endsWith('/index.md')
// vite-ignore is added here because of https://github.com/rolldown/rolldown/issues/8248
// remove once fixed upstream
/*@vite-ignore*/ (url.pathname.endsWith('/index.md')
? url.pathname.slice(0, -9) + '.md'
: url.pathname.slice(0, -3) + '/index.md') +
url.search +

@ -7,8 +7,9 @@ export const webFontsPlugin = (enabled = false): Plugin => ({
name: 'vitepress:webfonts',
enforce: 'pre',
transform(code, id) {
if (/[\\/]fonts\.s?css/.test(id)) {
transform: {
filter: { id: /\/fonts\.s?css(?:$|\?)/ },
handler(code) {
if (enabled) {
return code.match(webfontMarkerRE)?.[1]
} else {

Loading…
Cancel
Save