Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I enable HMR to function with subdomains? #461

Closed
2 tasks done
guillaumebriday opened this issue May 15, 2024 · 1 comment
Closed
2 tasks done

How can I enable HMR to function with subdomains? #461

guillaumebriday opened this issue May 15, 2024 · 1 comment
Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified

Comments

@guillaumebriday
Copy link

guillaumebriday commented May 15, 2024

  • I have tried upgrading by running bundle update vite_ruby.
  • 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 #179 but it does not fix my problem

Any idea how to fix that?

Thank you in advance!

@guillaumebriday guillaumebriday added the bug: pending triage Something doesn't seem to be working, but hasn't been verified label May 15, 2024
@guillaumebriday guillaumebriday changed the title How to make HMR works with subdomains? How can I enable HMR to function with subdomains? May 15, 2024
@guillaumebriday
Copy link
Author

Ok I found the problem. It's not related to Vite_ruby directly.

It was because I use thewebmock gem that override the StubSocket https://github.com/bblimke/webmock/blob/master/lib/webmock/http_lib_adapters/net_http.rb#L210 and it's not compatible with Vite ruby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified
Projects
None yet
Development

No branches or pull requests

1 participant