-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
fetch gives 'ERR_INVALID_URL' #394
Comments
I found a workaround:
Basically just not doing anything when on the server. I think others had similar questions: ~build client-only: #101 I also tried:
But Why client-only? I like vue to build the frontend. But then i need static files to be hosted on a file server, as the backend might be running in .NET or on Kubernetes and be connected only with API-Calls. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I try to dynamically language-.json's located in the public-directory. If i can not find any, i try to fetch the english-one like this:
const response = await fetch("/en.json");
Everything works nice with
cross-env DEBUG=vite-ssg:* vite
. When runningvite-ssg build --mode ssg
it builds for client but fails building for server with this:Several Questions:
Reproduction
Please see description
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: