-
Hi! I'm getting those errors when trying to make Vite + Ruby work : The assets are loading but no HMR. My local dev server is hosted on https. Not sure if it impact the connection for the WS. However, I also can't connect on https://127.0.0.1:3036/vite-dev/. I'm met with a 404 error. Any idea what could be the problem? Here's my configurations
vite.json
application.html.erb
routes.rb_
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Here's a demo repo you can pull : https://github.com/phbou72/vite-ruby-test |
Beta Was this translation helpful? Give feedback.
-
Is this issue related to this ? https://vite-ruby.netlify.app/guide/troubleshooting.html#making-hmr-work-with-puma-dev-in-https-apps |
Beta Was this translation helpful? Give feedback.
-
In that case, you'll need to configure Vite dev server to use You will also need to set |
Beta Was this translation helpful? Give feedback.
-
If I tried this config with the plugin @vitejs/plugin-basic-ssl:
I end up with this kind of error: https://app.io/vite-dev/@vite/client net::ERR_ABORTED 500 However, if I set Feel like I'm missing something? |
Beta Was this translation helpful? Give feedback.
In that case, you'll need to configure Vite dev server to use
https
by providing a valid certificate.You will also need to set
"https": true
so that Vite Ruby is aware, or use theskipProxy
experimental setting so that assets are requested from the Vite dev server directly.