vite_ruby icon indicating copy to clipboard operation
vite_ruby copied to clipboard

How can I enable HMR to function with subdomains?

Open guillaumebriday opened this issue 1 year ago • 0 comments

  • [x] I have tried upgrading by running bundle update vite_ruby.
  • [x] I have read the troubleshooting section before opening an issue.

Description 📖

I tried many different configuration (like "host": "0.0.0.0"), but HMR still does not work for me with subdomains. I tried to configure the host: https://vite-ruby.netlify.app/config/#host but it does not work.

I use multiple tenant based on subdomain like so: http://client-a.concilia.localhost:3000, http://client-b.concilia.localhost:3000, etc

I would like HMR to work for any subdomain, is it possible?

I have these errors in the console once I run VITE_RUBY_HOST=0.0.0.0 yarn vite and reload the page Screenshot 2024-05-15 at 17 12 09

I also found this issue https://github.com/ElMassimo/vite_ruby/issues/179 but it does not fix my problem

Any idea how to fix that?

Thank you in advance!

guillaumebriday avatar May 15 '24 21:05 guillaumebriday