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
/blog is powered by VitePress (I set base: '/blog/' in /blog/.vitepress/config.js)
The problem is that links from /blog pages to other pages of the website do not work
I checked the console and saw 404 for js bundles. And no document requests
Reproduction
Described above
Expected behavior
Links to pages pages outside /<basePath>/ should work.
As I understood, VitePress treats all the links under / as internal and applies routing and prefetching.
This is the root of the problem.
Scoping routing and prefetching to /<basePath>/ should fix the problem.
Describe the bug
I have the following site structure
/blog
is powered by VitePress (I setbase: '/blog/'
in/blog/.vitepress/config.js
)The problem is that links from
/blog
pages to other pages of the website do not workI checked the console and saw 404 for js bundles. And no document requests
Reproduction
Described above
Expected behavior
Links to pages pages outside
/<basePath>/
should work.As I understood, VitePress treats all the links under
/
as internal and applies routing and prefetching.This is the root of the problem.
Scoping routing and prefetching to
/<basePath>/
should fix the problem.Here is where an additional check for
basePath
is needed for Routerhttps://github.com/vuejs/vitepress/blob/main/src/client/app/router.ts#L125
Here is where an additional check for
basePath
is needed for preFetch https://github.com/vuejs/vitepress/blob/main/src/client/app/composables/preFetch.ts#L83System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: