javascript-in-rails
Installation
SKILL.md
JavaScript in Rails
Guide Rails applications through JavaScript setup, bundling choices, and Turbo/UJS replacements using Rails 7+ conventions.
Choose a JavaScript strategy
Import maps (default for Rails 7+)
- No Node.js or Yarn required.
- No build step; run
bin/rails server. - Use for most Hotwire-first apps and smaller JS needs.
JavaScript bundlers
- Use Bun, esbuild, Rollup, or Webpack.
- Bundlers integrate via
jsbundling-rails. - Run
bin/devduring development. - Node.js + Yarn required for esbuild/Rollup/Webpack.
- Bun is both runtime and bundler.