You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use my code-server with Sveltekit, the problem I am having is that when I start the server with: npx vite --port=4000
I can see it at code..com/proxy/4000 but buttons and assets don't work because the are trying to fetch them at code..com/example.jpg instead of code..com/proxy/4000/example.jpg. If I manually go to the /proxy/4000/example.jpg the image does appear. I figure the base path is wrong but I can't find how to change it.
I've read through #4541 and tried to implement the kit properties to the vite.config.ts but it tells me they don't exist. I have also tried adding base: '/proxy/4000' with no luck. I have also tried adding a proxy for the base path /: https://code.<domain>.com/proxy/4000/.
I have also read this but they don't have a svelte section and the others ones didn't help me.
I know I'm probably doing something stupid and this isn't a bug which is why I am putting it in discussions and not issues.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am trying to use my code-server with Sveltekit, the problem I am having is that when I start the server with:
npx vite --port=4000
I can see it at code..com/proxy/4000 but buttons and assets don't work because the are trying to fetch them at code..com/example.jpg instead of code..com/proxy/4000/example.jpg. If I manually go to the /proxy/4000/example.jpg the image does appear. I figure the base path is wrong but I can't find how to change it.
I've read through #4541 and tried to implement the kit properties to the vite.config.ts but it tells me they don't exist. I have also tried adding
base: '/proxy/4000'
with no luck. I have also tried adding a proxy for the base path/: https://code.<domain>.com/proxy/4000/
.I have also read this but they don't have a svelte section and the others ones didn't help me.
I know I'm probably doing something stupid and this isn't a bug which is why I am putting it in discussions and not issues.
I greatly appreciate any help :)
Beta Was this translation helpful? Give feedback.
All reactions