- Add jsbundling-rails to your Gemfile with
gem 'jsbundling-rails'
- Run ./bin/bundle install
- Run ./bin/rails javascript:install:esbuild
- Start your dev server with
foreman start -f Procfile.dev
, or run rails s
and yarn build --watch
separately.
- Make it work :) It’s highly dependent on your setup, whether you are using
webpack etc. Mostly it should be fairly straightforward.
- If you are using a separate yarn install on github actions, remove it as it’s
now taken care of by rails.
- Ensure you have yarn/node available if you are on Heroku:
heroku buildpacks:add --index 1 heroku/nodejs
- Deploy