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

dev home page doesn't honor base config #181

Closed
f-w opened this issue Dec 9, 2020 · 5 comments · Fixed by #223
Closed

dev home page doesn't honor base config #181

f-w opened this issue Dec 9, 2020 · 5 comments · Fixed by #223
Assignees
Labels
bug Something isn't working

Comments

@f-w
Copy link

f-w commented Dec 9, 2020

Describe the bug
yarn docs:dev renders home page on http://localhost:3000 despite base is defined in config.js. But asset links honor the base path.

To Reproduce
Steps to reproduce the behavior:

  1. follow getting started to create new site
  2. create file /docs/.vitepress/config.js with base set to, say /foo/
  3. run yarn docs:dev

Expected behavior
Site should be rendered at http://localhost:3000/foo/

System Info

  • vitepress version: 0.9.1
  • vite version: 1.0.0-rc.13
  • Node version: v14.5.0
  • OS version: Windows 10
@f-w f-w added the bug: pending triage Maybe a bug, waiting for confirmation label Dec 9, 2020
@285851937
Copy link

I have the same problem. It seems not work that specified a base property in .vitepress/config.js

@tolking
Copy link
Contributor

tolking commented Dec 12, 2020

Check out #105
Maybe, just use the base in build mode, like Vite.

@f-w
Copy link
Author

f-w commented Dec 13, 2020

As a workaround env var can be used to avoid hard coding.
Still a bug, I believe.

@285851937
Copy link

I think it's perfect that to support two modes to use vitepress.
mode 1: to build to static files and deploy that files on github or as a static resources behind nginx.
mode 2: being a web server revert proxied by nginx.

@kiaking kiaking added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jan 22, 2021
@kiaking
Copy link
Member

kiaking commented Jan 22, 2021

Yes, base is not working on dev mode at the moment. We should make it work.

@kiaking kiaking self-assigned this Feb 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants