ElMassimo / ElMassimo/vite_ruby
Vite ruby plugin causes server options to be ignored
- Dominant language
- Ruby
- Stars
- 1.6k
- Forks
- 149
- Avg merge
- 5h 13m
- Merged PRs (30d)
- 2
Description
[troubleshooting section]: https://vite-ruby.netlify.app/guide/troubleshooting.html
- [x] I have tried upgrading by running `bundle update vite_ruby`.
- [x] I have read the __[troubleshooting section]__ before opening an issue.
### Description 📖
`RubyPlugin` in vite config causes server options like `host` or `port` to be ignored.
### Reproduction 🐞
_Please provide a link to a repo that can reproduce the problem you ran into._
``` sh
rails new vite-rails-test
cd vite-rails-test
bundle add vite_rails
bundle install
bundle exec vite install
./node_modules/vite/bin/vite.js --host=0.0.0.0
```
Expected:
```
VITE v5.4.19 ready in 766 ms
➜ Local: http://localhost:5173/
➜ Network: http://192.168.1.171:5173/
➜ press h + enter to show help
```
Actual:
```
VITE v5.4.19 ready in 108 ms
➜ Local: http://localhost:3036/vite-dev/
➜ press h + enter to show help
```
The bug goes away if `RubyPlugin` is commented out in `vite.config.mts`
Vite Ruby Info
_Run `bin/rake vite:info` and provide the output:_
```
$ bin/rake vite:info
bin/vite present?: true
vite_ruby: 3.9.2
vite_rails: 3.0.19
rails: 8.0.2
ruby: ruby 3.4.3 (2025-04-14 revision d0b7e5b6a0) +PRISM [arm64-darwin24]
node: v20.11.1
yarn: 4.5.2
installed packages:
realphotos-marketplace@ /Users/bogdan/makabu/brad/realphotos-marketplace
├─┬ vite-plugin-ruby@5.1.1
│ └── vite@5.4.19 deduped
└── vite@5.4.19
```
Contributor guide
Assessment
This issue has not been assessed yet.