Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access the right router #388

Open
wbxl2000 opened this issue Dec 20, 2023 · 1 comment
Open

Cannot access the right router #388

wbxl2000 opened this issue Dec 20, 2023 · 1 comment

Comments

@wbxl2000
Copy link
Contributor

hi everyone, i'm using vite-ssg + vite + vue3 + vite-plugin-pages(or unplugin-vue-routes) to generate my app, now i encounter a problem:
After building the static files, my routes became invalid.

For example: I cannot access my website using domain.com/about because the generated file is about.html. i also try build vitesse, it can solve this problem! i look into the source code, but i don't konwn why, can anyone tell me the reason? thanks!

repo: https://github.com/wbxl2000/vite-pages/

step:

  1. pnpm run build
  2. open /dist folder with static server
  3. clicking on the route in the page will be correctly navigated
  4. entering the corresponding url of the router directly in the address bar will result in a 404 error.
@wbxl2000
Copy link
Contributor Author

This is my vercel config

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant