vite_ruby
vite_ruby copied to clipboard
Vite ruby plugin causes server options to be ignored
- [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.
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
├─┬ [email protected]
│ └── [email protected] deduped
└── [email protected]