vite_ruby
vite_ruby copied to clipboard
vite_rails: Improve default deployment and dev enviroment support
Rails 7.2+ ships with features like the ability to generate a devcontainer for development, Github Action to run tests and Rails 8 will ship with Kamal configured by default for deployment.
It would be helpful if vite_rails integrated into these systems automatically or (as a fallback) documented what steps users need to take in order to work with these new defaults.
At a first pass, I ran into trouble with:
- Github Action tests where vite wasn't installed (solved by manually adding
run: npm install
) - Kamal, where npx wasn't installed
- Devcontainers - untested.
There are some pointers in the existing docs, like a dependency on npx and some notes about devcontainers port forwarding, but I think it would be helpful to have very clear steps for Rails users as part of the vite_rails setup docs.
For example, I'm not sure if I should actually be running npm install
in my Github Action or if there's a bug somewhere in vite:install_dependencies
or other hooks which should automatically install the deps.