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

Testing local deployments for GitHub pages doesn't work since no basePath can be set #784

Open
hybridherbst opened this issue Sep 14, 2023 · 5 comments

Comments

@hybridherbst
Copy link

Description

serve is great! However, there are a number of scenarios that can't be tested with it, for example vite or sveltekit builds with basePath set or deployments to GitHub pages which also require a basePath.

I found this old issue but I think there are more than enough usecases, it's not just an "edge case", so thought it's worth bringing up again:
Related to #184

Library version

14.2.1

Node version

v18.13.0

@danantal
Copy link

danantal commented Feb 1, 2024

I would also love this, but not sure if anyone is looking into it :)

@disog
Copy link

disog commented Mar 8, 2024

This can be achieved with a symbolic link. For example, if my public folder is named dist, I would call:

ln -snf "`pwd`/dist" dist/<basePath> && serve dist

The pwd call is needed in order to create the link with an absolute path.

@hybridherbst
Copy link
Author

Hm, maybe I’m misunderstanding what you mean — the files would still be served without the basePath as part of the URL, right?

@disog
Copy link

disog commented Mar 9, 2024

@hybridherbst They would be served both with and w/o the base path. For testing local deployments (which is what we're trying to achieve), this should be enough.

@hybridherbst
Copy link
Author

I see. So it would explicitly not surface issues related to wrong base path usage (e.g. an accidental reference to toplevel instead of the base path) since the same files would be at root level as well.

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

3 participants