Replies: 4 comments 1 reply
-
Thanks for this! I tried it and it does allow the connection to work on GitHub Codespaces (mostly... it still drops the connection occasionally and reloads). But, after this config change, vite no longer connects at all when developing locally and gets stuck in a reload loop |
Beta Was this translation helpful? Give feedback.
-
For server: {
hmr: { clientPort: 3000 },
} |
Beta Was this translation helpful? Give feedback.
-
I'm using nuxt and vite is trying to access the URL : https://username-name-pw5v6766vg9374x4-3000.preview.app.github.dev:24678 instead of https://username-name-pw5v6766vg9374x4-24678.preview.app.github.dev , I tried changing the host but then the hmr server don't start , here is my config
|
Beta Was this translation helpful? Give feedback.
-
If you just want run your application using a terminal, i'm using a simple hack to run vite in dev using codespaces. Add bellow code inside vite.config.js
Run in your terminal Next go to your active ports and make vite host public to prevent CORS issues. |
Beta Was this translation helpful? Give feedback.
-
In case anyone has problems with the websocket connection on GitHub Codespaces.
vite@2.5.10
This fixes the issue
vite.config.js
Beta Was this translation helpful? Give feedback.
All reactions