vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.33k stars 923 forks source link

[Bug report] Can't access pages by typing the urls directly in browser address bar #265

Closed Benbinbin closed 3 years ago

Benbinbin commented 3 years ago

Bug report

I can't access the page through typing the url directly in browser address bar, but after building and hosting the dist file, I can access all pages

Description

I use Vuepress-next as a static site generator to build my blog, in my project I add extra homepage and some navigation pages refer to the documentation method, so I don't use the default theme navbar and homepage. Then I cannot access any markdown pages but just show the extra homepage and navigation pages in dev environment.

If I build the project it work fine, or change the bundler to webpack, I can access all pages in dev environment.

I think if I don't refer to the Markdown file in navbar or homepage, then I can't access it through typing the corresponding url directly in browser address bar. Should I set any parameter in Vite to get it work in dev environment?

Steps to reproduce

Screenshots

Environment info

Mister-Hope commented 3 years ago

Appears on my project too

meteorlxy commented 3 years ago

This is a regression. Need to fallback all requests to /index.html